I'm using gulp-file-include to move repetitive parts of my html pages (like page header and footer) to outside files. However, gulp-html does not seem to use the compiled version for its validation, because it gives me errors about missing title element within head (which is inside one of the partials).
Here's a shortened version of my gulpfile.js:
var gulp = require('gulp');
var gulpFileInclude = require('gulp-file-include');
var gulpHtml = require('gulp-html');
gulp.task('html', function () {
return gulp.src('src/*.html')
// Include partials
.pipe(gulpFileInclude({
prefix: '<!-- partial:',
suffix: ' -->',
basepath: 'src/partials/',
context: {
'compileJs': false
}
}))
// Validate
.pipe(gulpHtml())
.pipe(gulp.dest('dist/'));
});
Am I missing something or is it a bug?
I'm using gulp-file-include to move repetitive parts of my html pages (like page header and footer) to outside files. However, gulp-html does not seem to use the compiled version for its validation, because it gives me errors about missing title element within head (which is inside one of the partials).
Here's a shortened version of my gulpfile.js:
Am I missing something or is it a bug?