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'
]
gulp-pug
Integration withSee @unisharp/gulp-pug-inheritance.