panto-dependency-map

Dependency map for panto


Keywords
panto, dependency, map
License
Apache-2.0
Install
npm install panto-dependency-map@0.2.1

Documentation

panto-dependency-map

NPM version Downloads Build Status Dependency status Dev Dependency status Coverage Status

Dependency map for panto.

const DependencyMap = require('panto-dependency-map');

const dm = new DependencyMap();
dm.add('a.css', 'a.png', 'b.jpg', 'c.eot');
dm.add('b.css', 'a.png', 'e.jpg');
dm.add('a.js', 'b.js');
dm.add('main.html', '*.css', '*.js');

dm.resolve('b.js') // ['a.js', 'main.html']
dm.resolve('c.eot', 'e.jpg') // ['a.css', 'main.html', 'b.css']