Monday, May 13, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  5] [ 5]  / answers: 1 / hits: 43113  / 8 Years ago, sat, february 27, 2016, 12:00:00

I am getting an Error of TypeError: dest.on is not a function. When running this task, I can't figure out what could be wrong.


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('./'));
});

More From » node.js

 Answers
8

This line:



.pipe(fileinclude)


Should be this:



.pipe(fileinclude())

[#63127] Friday, February 26, 2016, 8 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
dustin

Total Points: 599
Total Questions: 105
Total Answers: 106

Location: Belarus
Member since Tue, Mar 14, 2023
1 Year ago
dustin questions
;