本文介紹了Gulp.js 任務,返回 src?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
限時送ChatGPT賬號..
我是 gulp 的新手,一直在研究示例設置.有些人的結(jié)構如下:
I'm new to gulp and have been looking through example set-ups. Some people have the following structure:
gulp.task("XXXX", function() {
gulp.src("....
其他人有這個:
gulp.task("XXXX", function() {
return gulp.src("....
我想知道 src 上的 return 有什么不同?
I'm wondering what difference the return on the src makes??
推薦答案
你return
表示任務是異步的.gulp.src()
返回一個流,所以它是異步的.
You return
to indicate that the task is async. gulp.src()
returns a stream, so it's async.
沒有它,任務系統(tǒng)將不知道它何時完成.閱讀文檔.
Without it the task system wouldn't know when it finished. Read the docs.
這篇關于Gulp.js 任務,返回 src?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權益,請聯(lián)系我們刪除處理,感謝您的支持!