我不能在我的副业中使用硫化胶。我已经学习了这个例子,但是似乎什么都没有发生,控制台中也没有错误。
这是我的文件夹结构:
建造/建造
- 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文件:
发布于 2015-12-29 09:50:50
在与您的index.html目录相同的目录中没有gulpfile文件。所以什么都不会发生。给它适当的途径:
gulp.task 'vulcanize', ->
gulp.src 'build/html/index.html'
.pipe vulcanize()
.pipe gulp.dest 'vulcanized'不要传递任何硫化()选项,因为您只是传递它的默认值,所以它是无用的。
顺便说一下,Gulp接受咖啡文件,您不必将您的gulpfile.coffee编译成gulpfile.js。去吧:
npm install -g coffee-script
gulp
> using gulpfile.coffeehttps://stackoverflow.com/questions/34508378
复制相似问题