Closed gentlee closed 1 month ago
Hi @gentlee thanks for the suggestion.
dependency-cruiser's primary use case is to run it as part of a permanent setup.
Besides, running it as a one-off with e.g. npx
comes with some complications:
--init
will detect most of these for you and save them in a configuration file. That said even with these complication it's possible to run dependency-cruiser with npx
npx
.Mileage may vary, though.
Some examples:
# list all dependencies in src in text format
npx --package typescript --package dependency-cruiser -- \
depcruise src --no-config --include-only ^src --ts-config tsconfig.json --output-type text
# npx will ask if it's OK to install typescript and dependency-cruiser;
# hit enter to confirm
# list all dependencies in src and use the experimental
# x-dot-webpage reporter to generate a webpage with a graph
# of the dependencies with the native graphviz' dot
# command + show it in the browser with the `browser` command/ script
npx --package typescript --package dependency-cruiser -- \
depcruise src --no-config --include-only ^src --ts-config tsconfig.json --output-type x-dot-webpage > dependencies.html
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Would be nice to just call:
npx dependency-cruiser src
to show the graph, without the need of installing anything.
Context
I don't want to install and then remove this package if I want it to be used once.
Expected Behavior
Just run
npx dependency-cruiser src
and get graphCurrent Behavior
Need to do installation steps then remove it.