@nathanfaucett/dependency_tree

commonjs style dependency tree parser


Keywords
dependency_tree, dependency_tree.js
License
MIT
Install
npm install @nathanfaucett/dependency_tree@0.0.3

Documentation

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);
    });
});