Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a CLI script to locally generate the graph svg #87

Open
matheusd opened this issue Jun 14, 2021 · 1 comment
Open

Add a CLI script to locally generate the graph svg #87

matheusd opened this issue Jun 14, 2021 · 1 comment

Comments

@matheusd
Copy link

The main use case would be to automate generation of the dependency graph without having to spin a browser and download the svg.

Ideally, this would be project-local script that would get installed as a dev dependency to be executed either manually or in a CI. The user API would be something like:

$ npmgraph --packages "foo,bar@1.3.4,baz" --output my-project-deps.svg
@broofa
Copy link
Collaborator

broofa commented Jun 14, 2021

Good idea. 'Shouldn't be that hard to get working. Fetching the dependency tree happens in Store.js, which uses window.fetch() under the hood. That would have to be refactored to work on the server. Also, getting graphviz to run on the server will take a similar rework.

People will probably want this to work with local filesystem repos, github repos, and private registries, though... that's a whole other bag of worms to deal with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants