为什么我得到这个错误? dest.on不是一个函数 – 使用gulp-file-include
我得到了TypeError: dest.on is not a function
的错误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())
- 在CruiseControl.NET上运行gulp任务
- browserSync不能正常工作
- gulp sass源地图
- Symlinking一个大文件,但得到path符号链接从
- 如何debugginggulpfile.js
- 尝试运行一个例子吞噬的问题 – “inheritance`的超级构造函数不能为空或未定义。
- 使用VB.NET在file.bat中执行gulp时没有任何反应
- Gulp突然停止了与BrowserSync的合作。 node_modules / glob-watcher上的RangeError
- Angularjs从express.js的“public”文件夹的“views”文件夹中路由ejs静态文件