[英]How to properly use gulp-vulcanize
我不能在副项目中使用gulp-vulcanize。 我遵循了示例,但似乎什么也没有发生,控制台中也没有错误。
这是我的文件夹结构:
建立/
-html /
-CSS /
-js /
资源/
-html /
-CSS /
-js /
bower.json
gulpfile.coffee
gulpfile.js
package.json
这是我正在使用的gulp任务
gulp.task 'vulcanize',
->
gulp.src 'index.html'
.pipe plumber()
.pipe vulcanize {
abspath: ''
excludes: []
stripExcludes: false
}
.pipe gulp.dest 'vulcanized'
我正在使用以下内容来硫化我的html文件:
在与gulpfile
相同的目录中没有index.html
文件。 所以什么都不会发生。 给它正确的路径:
gulp.task 'vulcanize', ->
gulp.src 'build/html/index.html'
.pipe vulcanize()
.pipe gulp.dest 'vulcanized'
不要将任何选项传递给vulcanuze(),因为您只是传递其默认值,所以它没有用。
顺便说一句,Gulp接受咖啡文件,您不必将gulpfile.coffee
编译为gulpfile.js
。 去吧 :
npm install -g coffee-script
gulp
> using gulpfile.coffee
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.