twig-deps
v1.0.6
Published
Walk the dependency graph of a Twig template
Downloads
5
Readme
twig-deps
Walk the dependency graph of a Twig template.
Installation
npm install twig-deps
Example
var TwigDeps = require('twig-deps');
var depper = new TwigDeps();
var entry = '/path/to/your/template.twig';
depper.on('data', function (dependency) {
// do something with dependency
});
depper.on('missing', function (dependency) {
// do something with missing dependency
});
depper.on('error', function (error) {
// do something on error
});
depper.end(entry);
Contributing
- Fork the main repository
- Code
- Implement tests using node-tap
- Issue a pull request keeping in mind that all pull requests must reference an issue in the issue queue
License
Apache-2.0 © Eric MORAND