package-analyser is a simple and easy-to-use NodeJS command-line tool for analyzing dependencies and dependency sizes.
It provides the following features:
- Analyzing dependencies in production and development environments.
- Analyzing dependency sizes in the production environment.
- Detecting and displaying circular dependencies in the current project.
- Visualizing dependency relationships in 2D and 3D:
- Supports searching for a specific dependency and locating it.
- Supports displaying dependencies as straight lines or curves.
- Visualizing dependency sizes with charts.
- Supports both light and dark modes.
- Supports displaying results on a webpage or exporting them as JSON files.
npm i package-analyser -g
Note:
Since package-analyser is a command-line tool, it needs to be installed globally.
/**
* @param {number} depth: The depth of dependencies (integer or Infinity).
* @param {string} jsonFile: The path to the output JSON file (relative to the current directory).
*/
analyze-cli analyze [depth] [jsonFile]
Action | Effect |
---|---|
Left-click on a node | Drag the node. |
Left-click on the canvas | Pan the view. |
Double-click on the canvas | Zoom in the view. |
Double-click on a node in the sidebar | Jump to the node. |
Scroll the mouse wheel | Zoom in or out the view. |
Action | Effect |
---|---|
Left-click on the canvas | Rotate the view. |
Left-click/Right-click on a node | Drag the node. |
Right-click on the canvas | Pan the view. |
Scroll the mouse wheel | Zoom the view. |
If the data in the localStorage is manually deleted and cannot be displayed correctly, please delete the "time.txt" file in the project root directory and run the command again.