mirror of
https://github.com/fafhrd91/actix-net
synced 2025-03-14 19:06:25 +01:00
chore: fix doc recipe
This commit is contained in:
parent
323a2e2931
commit
f4175a4ad4
13
justfile
13
justfile
@ -70,9 +70,20 @@ test-docs toolchain="": && doc
|
|||||||
test-all toolchain="": (test toolchain) (test-docs toolchain)
|
test-all toolchain="": (test toolchain) (test-docs toolchain)
|
||||||
|
|
||||||
# Document crates in workspace.
|
# Document crates in workspace.
|
||||||
doc *args:
|
doc *args: && doc-set-workspace-crates
|
||||||
|
rm -f "$(cargo metadata --format-version=1 | jq -r '.target_directory')/doc/crates.js"
|
||||||
RUSTDOCFLAGS="--cfg=docsrs -Dwarnings" cargo +nightly doc --no-deps --workspace {{ all_crate_features }} {{ args }}
|
RUSTDOCFLAGS="--cfg=docsrs -Dwarnings" cargo +nightly doc --no-deps --workspace {{ all_crate_features }} {{ args }}
|
||||||
|
|
||||||
|
[private]
|
||||||
|
doc-set-workspace-crates:
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
(
|
||||||
|
echo "window.ALL_CRATES ="
|
||||||
|
cargo metadata --format-version=1 \
|
||||||
|
| jq '[.packages[] | select(.source == null) | .targets | map(select(.doc) | .name)] | flatten'
|
||||||
|
echo ";"
|
||||||
|
) > "$(cargo metadata --format-version=1 | jq -r '.target_directory')/doc/crates.js"
|
||||||
|
|
||||||
# Document crates in workspace and watch for changes.
|
# Document crates in workspace and watch for changes.
|
||||||
doc-watch:
|
doc-watch:
|
||||||
@just doc --open
|
@just doc --open
|
||||||
|
Loading…
x
Reference in New Issue
Block a user