Rebuild only affected jade files with gulp-jade-find-affected -



Rebuild only affected jade files with gulp-jade-find-affected -

i'm trying utilize gulp-jade-find-affected rebuild watcher affected files. example, if update in layout or mixin file, want rebuild files includes mixin.

but illustration on plugin's github doesn't work since update of gulp-watch (emitonglob alternative doesn't exist anymore).

after research, found this solution , tried adapt case doesn't work :

var gulp = require('gulp'), watch = require('gulp-watch'), fs = require('fs'), jade = require("gulp-jade"), affected = require('gulp-jade-find-affected'); var destjade = './docs/'; gulp.task('templates', function() { homecoming gulp.src('src/fr_fr/pages/*.jade').pipe(watch('src/fr_fr/**/*.jade', function(files) { homecoming files .pipe(affected()) .pipe(jade({ pretty: true, data: json.parse(fs.readfilesync('./src/fr_fr/data/data.json', 'utf8')) })) .pipe(gulp.dest(destjade)); })); });

if has thought want, i'll appreciate !

thanks attention.

i'm author of gulp-jade-find-affected module. give thanks involvement in module. i've updated (or instructions) back upwards cooperation newest version of gulp-watch in v.0.2.0.

i found thread accident, if have more issues module, of great help if please create issue on github-repo. i'll seek prepare them possible.

jade gulp gulp-watch

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -