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