在这样的片段中:
gulp.task "coffee", ->
gulp.src("src/server/**/*.coffee")
.pipe(coffee {bare: true}).on("error",gutil.log)
.pipe(gulp.dest "bin")
gulp.task "clean",->
gulp.src("bin", {read:false})
.pipe clean
force:true
gulp.task 'develop',['clean','coffee'], ->
console.log "run something else"
在 develop 任务中,我想运行 clean 并在完成后运行 coffee ,完成后运行其他内容.但我无法弄清楚.这块不行.请指教.
In develop task I want to run clean and after it's done, run coffee and when that's done, run something else. But I can't figure that out. This piece doesn't work. Please advise.
它还没有正式发布,但是即将推出的 Gulp 4.0 让您可以轻松地使用 gulp.series 执行同步任务.你可以这样做:
It's not an official release yet, but the coming up Gulp 4.0 lets you easily do synchronous tasks with gulp.series. You can simply do it like this:
gulp.task('develop', gulp.series('clean', 'coffee'))
我找到了一篇很好的博客文章,介绍了如何升级和使用这些简洁的功能:通过示例迁移到 gulp 4
I found a good blog post introducing how to upgrade and make a use of those neat features: migrating to gulp 4 by example
这篇关于如何一个接一个地依次运行 Gulp 任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
Browserify,Babel 6,Gulp - 传播运算符上的意外令牌Browserify, Babel 6, Gulp - Unexpected token on spread operator(Browserify,Babel 6,Gulp - 传播运算符上的意外令牌)
是否可以将标志传递给 Gulp 以使其以不同的方式Is it possible to pass a flag to Gulp to have it run tasks in different ways?(是否可以将标志传递给 Gulp 以使其以不同的方式运行任务
为什么我们需要在全局和本地安装 gulp?Why do we need to install gulp globally and locally?(为什么我们需要在全局和本地安装 gulp?)
打开 Javascript 文件时 Visual Studio 2015 崩溃Visual Studio 2015 crashes when opening Javascript files(打开 Javascript 文件时 Visual Studio 2015 崩溃)
检测 FLASH 插件崩溃Detect FLASH plugin crashes(检测 FLASH 插件崩溃)
我的网站总是崩溃 IE,无法调试My website keeps crashing IE, can#39;t debug(我的网站总是崩溃 IE,无法调试)