mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-10 04:09:37 +00:00
Add a crate-dep-graph script for showing the crate dependency graph
This commit is contained in:
parent
9f32a6e209
commit
43da36948b
1 changed files with 19 additions and 0 deletions
19
script/crate-dep-graph
Executable file
19
script/crate-dep-graph
Executable file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [[ -x cargo-depgraph ]]; then
|
||||||
|
cargo install cargo-depgraph
|
||||||
|
fi
|
||||||
|
|
||||||
|
graph_file=target/crate-graph.html
|
||||||
|
|
||||||
|
cargo depgraph \
|
||||||
|
--workspace-only \
|
||||||
|
--offline \
|
||||||
|
--root=zed,cli,collab \
|
||||||
|
--dedup-transitive-deps \
|
||||||
|
| dot -Tsvg > $graph_file
|
||||||
|
|
||||||
|
echo "open $graph_file"
|
||||||
|
open $graph_file
|
Loading…
Reference in a new issue