16
TypeError: dest.on is not a function
というエラーが発生しました。このタスクを実行するとき、私は何が間違っているのか理解できません。なぜこのエラーが発生しますか? dest.onは関数ではありません - gulp-file-includeを使用しています
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('./'));
});
カントは、私は大爆笑ことを逃したと信じてどうもありがとうございました。 は、あなたは私がpath.joinを使用しようとしたとき(paths.templatesを、なぜ「* .tpl.html)、それはエラーパスを与えるだろう が定義されていない – 91eahz
あなたはおそらく '忘れたVARパス=必要(」パス ')'知っているだろう。 –
おかげさまでありがとう、私はまだ学んでいますが、ゆっくりと物事をすべて魅力のように働かせています。素晴らしい一日を – 91eahz