LUNA is a software development tool for node.js (and other javascript) projects, with a focus on libraries. The goal of LUNA is to aid developers in better understanding how libraries are being utilized in their projects.
- Node.js
- Your node.js project
Inside any node.js project, run:
npx luna-scanner
After analyzing the source code, it will generate a LUNA report, which includes a visualization about the interaction between source code and libraries. (Live Demo)
LUNA Report Manual
- Drag (click and hold) the mouse to pan around or move nodes around
- Use the mouse wheel to zoom in or out
- Hovering over a node will display information on the bottom left and highlight connected nodes
- Using Shift + Click on a node will lock it, so that focus remains on this node (Shift + Click node again to unlock)
- Double Click nodes or groups in the graph or menu to collapse/expand them
- Use the menu on the left to manipulate the graph:
- Adjust the scale of the graph / space between nodes
- Adjust the layout of the graph / position of the nodes
- Hide a selection of nodes (representing libraries or files)
- Highlight a selection of nodes (representing libraries or files)
- Hover your mouse above menu items to find more information about their functionality
Via package.json
(defaults):
{
...
"luna": {
"debug": false, // toggle debug mode
"components": { // toggle components of LUNA
"callGraph": true, // detection of function calls within files
"dependencyTree": true, // detection of dependency chains
"libraryAPI": true, // detection of used API of libraries
},
"ignore": [], // array of glob patterns for LUNA's scanner to ignore
},
...
}
Via command line arguments (limited):
npx luna-scanner [path_to_project] [debug]
- The library used to handle collapsing and expanding of nodes may break in some situations. Best to avoid excessive collapsing/expanding.
Much appreciated! I encourage you to use my feedback form.