@nathanfaucett/dependency_tree

0.0.5 • Public • Published

DependencyTree

commonjs style dependency tree parser

var DependencyTree = require("@nathanfaucett/dependency_tree");


var tree = DependencyTree.create("./path/to/index.js");


tree.parse();

tree.chunks.forEach(function(chunk) {
    console.log(chunk.fullPath);

    chunk.dependencies.forEach(function(dependency) {
        console.log("\t" + dependency.fullPath);
    });
});

Package Sidebar

Install

npm i @nathanfaucett/dependency_tree

Weekly Downloads

1

Version

0.0.5

License

MIT

Last publish

Collaborators

  • nathanfaucett