Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/unisharp/pug-inheritance
Get files which include or extend the given Pug file.
https://github.com/unisharp/pug-inheritance
pug pug-inheritance
Last synced: 2 months ago
JSON representation
Get files which include or extend the given Pug file.
- Host: GitHub
- URL: https://github.com/unisharp/pug-inheritance
- Owner: UniSharp
- Created: 2016-12-03T17:42:38.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-27T02:51:03.000Z (over 7 years ago)
- Last Synced: 2024-10-11T15:13:27.673Z (3 months ago)
- Topics: pug, pug-inheritance
- Language: JavaScript
- Homepage:
- Size: 11.7 KB
- Stars: 12
- Watchers: 13
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pug Inheritance - Another Implementation by UniSharp
[![Build Status](https://travis-ci.org/UniSharp/pug-inheritance.svg?branch=master)](https://travis-ci.org/UniSharp/pug-inheritance)
Get files which include or extend the given [Pug](https://github.com/pugjs/pug) file.
## Installation
### Via npm
```bash
npm install @unisharp/pug-inheritance --save
```### Via yarn
```bash
yarn add @unisharp/pug-inheritance
```## Usage
```javascript
const PugInheritance = require('@unisharp/pug-inheritance');let pugInheritance = new PugInheritance('resources/pug/**/*.pug');
```### Inheritance files
```javascript
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](https://github.com/pugjs/gulp-pug)
See [@unisharp/gulp-pug-inheritance](https://github.com/UniSharp/gulp-pug-inheritance).
## License
[MIT](https://unisharp.mit-license.org/)