Ответ 1
Эта строка:
.pipe(fileinclude)
Должно быть:
.pipe(fileinclude())
Я получаю сообщение об ошибке TypeError: dest.on is not a function
. При выполнении этой задачи я не могу понять, что может быть неправильным.
var fileinclude = require('gulp-file-include');
var rename = require('gulp-rename');
var paths = {
templates : './templates/'
}
//file include: grab partials from templates and render out html files
gulp.task('fileinclude', function() {
return gulp.src(paths.templates + '*.tpl.html')
.pipe(fileinclude)
.pipe(rename({
extname: ""
}))
.pipe(rename({
extname: ".html"
}))
.pipe(gulp.dest('./'));
});
Эта строка:
.pipe(fileinclude)
Должно быть:
.pipe(fileinclude())