panto-dependency-map
v0.2.1
Published
Dependency map for panto
Downloads
28
Readme
panto-dependency-map
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']