Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/unisharp/gulp-pug-inheritance
Only build affected files when modify a Pug file.
https://github.com/unisharp/gulp-pug-inheritance
gulp pug pug-inheritance
Last synced: 3 months ago
JSON representation
Only build affected files when modify a Pug file.
- Host: GitHub
- URL: https://github.com/unisharp/gulp-pug-inheritance
- Owner: UniSharp
- Created: 2016-12-06T04:18:58.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-12-06T08:19:46.000Z (about 8 years ago)
- Last Synced: 2024-04-25T06:21:35.613Z (9 months ago)
- Topics: gulp, pug, pug-inheritance
- Language: JavaScript
- Homepage:
- Size: 11.7 KB
- Stars: 15
- Watchers: 13
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gulp Pug Inheritance
[![Build Status](https://travis-ci.org/UniSharp/gulp-pug-inheritance.svg?branch=master)](https://travis-ci.org/UniSharp/gulp-pug-inheritance)
Only build affected files when modify a [Pug](https://github.com/pugjs/pug) file.
## Installation
### Via npm
```bash
npm install @unisharp/gulp-pug-inheritance --save
```### Via yarn
```bash
yarn add @unisharp/gulp-pug-inheritance
```## Usage
```javascript
'use strict';const gulp = require('gulp');
const pug = require('gulp-pug');
const pugInheritance = require('@unisharp/gulp-pug-inheritance');gulp.task('watch-pug', () => {
return gulp.watch('resources/pug/**/*.pug', e => {
gulp.src(e.path, { base: 'resources/pug' })
.pipe(pugInheritance('resources/pug/**/*.pug'))
.pipe(pug({ pretty: true }))
.pipe(gulp.dest('resources/views'));
});
});
```