Closed pure180 closed 8 years ago
Maybe Iam doing something wrong, but using a template based jade build environment with subfolder, includes and extendsare not considered on watch task when saving them.
includes
extends
Maybe you can take a look at it, thanks in advanced.
My build Enviroment
src -- jade ----- layouts -------- default.jade ----- partials -------- mypartial.jade ----- templates -------- index.jade
My gulpfile.js
'use-strict'; var gulp = require('gulp'); var jade = require('gulp-jade'); var changed = require('gulp-changed'); var cached = require('gulp-cached'); var gulpif = require('gulp-if'); var filter = require('gulp-filter'); var jadeInheritance = require('gulp-jade-inheritance'); gulp.task('jade', function(){ return gulp.src( './src/jade/templates/**/*.jade' ) .pipe(changed('dist', {extension: '.html'})) .pipe(gulpif(global.isWatching, cached('jade'))) .pipe(jadeInheritance({basedir: 'src/jade/templates'})) .pipe(filter(function (file) { return !/\/_/.test(file.path) || !/^_/.test(file.relative); })) .pipe(jade({ pretty: true })) .pipe(gulp.dest( 'dist' )) }); gulp.task('setWatch', function() { global.isWatching = true; }); gulp.task('watch', [ 'setWatch', 'jade'], function() { gulp.watch( 'src/jade/**/*.jade', ['jade']); });
change gulp.src( './src/jade/templates/**/*.jade' ) for gulp.src( './src/jade/**/*.jade' ), gulp-changed should be able to see all the jade files
gulp.src( './src/jade/templates/**/*.jade' )
gulp.src( './src/jade/**/*.jade' )
Maybe Iam doing something wrong, but using a template based jade build environment with subfolder,
includes
andextends
are not considered on watch task when saving them.Maybe you can take a look at it, thanks in advanced.
My build Enviroment
My gulpfile.js