jsviz

1.0.1 • Public • Published

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):

jsviz of jsviz

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 = require('jsviz');
 
// Grab the dependency graph
jsviz.graph('~/taco-project', function (err, graph) {
 
});
 
// Turn the graph into html
jsviz.html(graph, function (err, html) {
 
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    3
  • 1.0.0
    0

Package Sidebar

Install

npm i jsviz

Weekly Downloads

3

Version

1.0.1

License

ISC

Last publish

Collaborators

  • jeffcarp