pug-inheritance

Get files which include or extend the given Pug file.

Downloads
18
Stars
12

Pug Inheritance - Another Implementation by UniSharp

Get files which include or extend the given Pug file.

Installation

Via npm

npm install @unisharp/pug-inheritance --save

Via yarn

yarn add @unisharp/pug-inheritance

Usage

const PugInheritance = require('@unisharp/pug-inheritance');

let pugInheritance = new PugInheritance('resources/pug/**/*.pug');

Inheritance files

console.log(pugInheritance.getInheritance('resources/pug/layout/app.pug'));

Output

[
    'resources/pug/layout/app.pug',
    'resources/pug/index.pug',
    'resources/pug/page.pug'
]

Integration with gulp-pug

See @unisharp/gulp-pug-inheritance.

License

MIT