require-dependency-map
v3.1.1
Published
Generate a interactive dependency map scanning your project for all require calls
Downloads
10
Readme
require-dependency-map
###LIVE DEMO Generates a d3 interactive dependency map based on all require calls. Pretty cool, huh?
###How can I get my project to look so awesome ?
npm install require-dependency-map
Example using a grunt task:
const processDependency = require('require-dependency-map');
module.exports = (grunt) =>
grunt.task.registerTask('outputDependency', 'outputs dependency d3 dir', function () {
const done = this.async();
const {src = 'src', target = 'dependency-map'} = this.options();
processDependency(src, target)
.then(() => done())
.catch(e => console.error(e));
});
This task will generate a folder in the root:
- root
- src
- style
- test
- dependency-map
- index.js
- tree.js
- style.css
- index.html
- outputDependency.json
Open index.html and enjoy your interactive dependency map.