twig-deps

1.0.6 • Public • Published

twig-deps

NPM version Build Status Dependency Status Coverage percentage

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

Readme

Keywords

none

Package Sidebar

Install

npm i twig-deps

Weekly Downloads

4

Version

1.0.6

License

Apache-2.0

Unpacked Size

27.9 kB

Total Files

43

Last publish

Collaborators

  • ericmorand