Closed spinxdigital closed 5 years ago
@spinxdigital can you provide more details about the error you're seeing? There's not enough context in this comment.
Actually on each error on template compiling I was getting error and I had restart gulp watch. But now I can handle error by below code (with plumber).
gulp.task('nunjucks', function () {
return gulp.src('app/pages/**/*.+(html|nunjucks)')
.pipe($.data(readTemplateData()))
.pipe($.plumber({
errorHandler: onError
}))
.pipe($.nunjucksRender({
path: ['app/templates']
}))
.pipe(gulp.dest('dist'));
});
Here is my code.