https://github.com/hchiam/deps
Create a dependency graph visual, starting from a folder or file.
https://github.com/hchiam/deps
dependecy files folders graph js ts visualization
Last synced: 3 months ago
JSON representation
Create a dependency graph visual, starting from a folder or file.
- Host: GitHub
- URL: https://github.com/hchiam/deps
- Owner: hchiam
- License: mit
- Created: 2020-07-26T05:01:47.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-08-28T04:16:02.000Z (10 months ago)
- Last Synced: 2025-03-19T08:03:40.638Z (3 months ago)
- Topics: dependecy, files, folders, graph, js, ts, visualization
- Language: Shell
- Homepage:
- Size: 31.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `@hchiam/deps` [](https://www.npmjs.com/package/@hchiam/deps) [](https://github.com/hchiam/deps/blob/master/LICENSE)
## Example usage:
This:
was generated by this: (after you install [`@hchiam/deps`](https://www.npmjs.com/package/@hchiam/deps), not [`deps`](https://www.npmjs.com/package/deps))
```bash
deps
Enter max depth:
Enter src folder (or file or other folder you'd like to inspect): src
```This interactive CLI tool `deps` generates a [dependency graph](https://en.wikipedia.org/wiki/Dependency_graph) of your files. You just have to give it a file or folder as a starting point. You can (optionally) tell it how deep to explore. It's basically a convenient but limited wrapper around [`depcruise`](https://www.npmjs.com/package/dependency-cruiser), which gives you an interactive SVG (clicking on nodes shows you code from local files).
## Install:
```bash
npm -g install @hchiam/deps
```Now you can use it in any folder with this command:
```bash
deps
```## Further development
Commands I found useful while creating the npm package for this CLI tool from scratch:
- `npm link`
- `rm /Users/howard/.nvm/versions/node/v10.13.0/bin/deps`
- `npm publish --access public`A newer example of how to publish to npm (package.json setup only + `yarn publish`):
- https://github.com/hchiam/trysterollup/tree/24457690a715e1c57e701b0d51e3b6fd3e50491c
- https://github.com/hchiam/trysterollup/blob/24457690a715e1c57e701b0d51e3b6fd3e50491c/package.json