jsviz
For visualizing the internal and external dependencies of a JavaScript codebase. Takes a directory to analyze and outputs a graph representation in HTML.
Uses esprima
and estraverse
to walk the syntax tree, pick out any require()
calls, and generate a dependency graph. Generates an HTML file and uses d3
to visualize the graph. Example output (of this project):
Usage
From the command line, pass in a directory (that you want analyed) and an output file:
npm i -g jsviz jsviz ~/taco-project > taco-project-viz.html
From JavaScript:
npm i jsviz
var jsviz = ; // Grab the dependency graphjsviz; // Turn the graph into htmljsviz;