1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-03-13 22:22:37 +01:00

chore: fix doc recipe

This commit is contained in:
Rob Ede 2025-03-08 17:24:12 +00:00
parent 323a2e2931
commit f4175a4ad4
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933

@ -70,9 +70,20 @@ test-docs toolchain="": && doc
test-all toolchain="": (test toolchain) (test-docs toolchain)
# 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 }}
[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.
doc-watch:
@just doc --open