I made some changes to a partial file _header but the other files brownies and pie that included this partial file are not being updated. Could you help with this issue, please? Thanks!
gulp.task('jade', function() {
return gulp.src('app/**/*.jade')
//only pass unchanged *main* files and *all* the partials
.pipe($.changed('dist', {extension: '.html'}))
//filter out unchanged partials, but it only works when watching
.pipe($.if(global.isWatching, $.cached('jade')))
//find files that depend on the files that have changed
.pipe(jadeInheritance({basedir: 'jade'}))
//filter out partials (folders and files starting with "_" )
.pipe($.filter(function (file) {
return !/\/_/.test(file.path) && !/^_/.test(file.relative);
}))
//process jade templates
.pipe($.jade({
pretty : true
}))
//save all the files
.pipe(gulp.dest('dist'));
});
gulp.task('setWatch', function() {
global.isWatching = true;
});
Hi!
I made some changes to a partial file
_header
but the other filesbrownies
andpie
that included this partial file are not being updated. Could you help with this issue, please? Thanks!File structure:
/app/includes/_header.jade /app/recipes/brownies.jade /app/recipes/pie.jade
Task: jade
Task: watch