久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <legend id='ErWXq'><style id='ErWXq'><dir id='ErWXq'><q id='ErWXq'></q></dir></style></legend>
  • <i id='ErWXq'><tr id='ErWXq'><dt id='ErWXq'><q id='ErWXq'><span id='ErWXq'><b id='ErWXq'><form id='ErWXq'><ins id='ErWXq'></ins><ul id='ErWXq'></ul><sub id='ErWXq'></sub></form><legend id='ErWXq'></legend><bdo id='ErWXq'><pre id='ErWXq'><center id='ErWXq'></center></pre></bdo></b><th id='ErWXq'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ErWXq'><tfoot id='ErWXq'></tfoot><dl id='ErWXq'><fieldset id='ErWXq'></fieldset></dl></div>
      <bdo id='ErWXq'></bdo><ul id='ErWXq'></ul>

        <small id='ErWXq'></small><noframes id='ErWXq'>

        <tfoot id='ErWXq'></tfoot>
      1. 在繼續(xù)下一個任務之前使 gulp 同步寫入文件

        Making gulp write files synchronously before moving on to the next task(在繼續(xù)下一個任務之前使 gulp 同步寫入文件)

            <i id='on7ws'><tr id='on7ws'><dt id='on7ws'><q id='on7ws'><span id='on7ws'><b id='on7ws'><form id='on7ws'><ins id='on7ws'></ins><ul id='on7ws'></ul><sub id='on7ws'></sub></form><legend id='on7ws'></legend><bdo id='on7ws'><pre id='on7ws'><center id='on7ws'></center></pre></bdo></b><th id='on7ws'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='on7ws'><tfoot id='on7ws'></tfoot><dl id='on7ws'><fieldset id='on7ws'></fieldset></dl></div>

            <small id='on7ws'></small><noframes id='on7ws'>

                <tbody id='on7ws'></tbody>
              <legend id='on7ws'><style id='on7ws'><dir id='on7ws'><q id='on7ws'></q></dir></style></legend>
                  <bdo id='on7ws'></bdo><ul id='on7ws'></ul>

                  <tfoot id='on7ws'></tfoot>

                  本文介紹了在繼續(xù)下一個任務之前使 gulp 同步寫入文件的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  gulpfile.js

                  gulpfile.js

                  gulp.task('browser-bundle', ['react'], function() {
                  ...
                  
                  });
                  
                  
                  gulp.task('react', function(){
                    gulp.src(options.JSX_SOURCE)
                        .pipe(react())
                        .pipe(gulp.dest(options.JSX_DEST))
                  });
                  

                  如您所見,我有瀏覽器捆綁任務,具體取決于反應任務.我相信這可以按預期工作,因為在輸出中我看到了:

                  As you can see I have the browser-bundle task depending on the react task. I believe this works as expected because in the output I see this:

                  [gulp] Running 'react'...
                  [gulp] Finished 'react' in 3.43 ms
                  [gulp] Running 'browser-bundle'...
                  

                  然而,雖然 react 任務已經完成,但它應該寫入操作系統(tǒng)的文件還沒有完全到位.我注意到,如果我在瀏覽器捆綁命令中添加了一個 sleep 語句,那么它會按預期工作,但這對我來說似乎有點 hacky.

                  However, although the react task is finished, the files its supposed to write to the operating system are not quite there yet. I've notice that if I put a sleep statement in the browser bundle command then it works as expected, however this seems a little hacky to me.

                  如果我希望在文件(來自 gulp.dest)被同步寫入磁盤之前不認為反應任務完成,我該怎么做?

                  If I want the react task to not be considered finished until the files (from gulp.dest) have been synchronously written to disk how would I do that?

                  推薦答案

                  你需要一個return語句:

                  You need a return statement:

                  gulp.task('react', function(){
                      return gulp.src(options.JSX_SOURCE)
                          .pipe(react())
                          .pipe(gulp.dest(options.JSX_DEST))
                  });
                  

                  這樣,我所有的寫操作都在下一個任務處理之前完成.

                  With this all my write operations are done before the next task processed.

                  這篇關于在繼續(xù)下一個任務之前使 gulp 同步寫入文件的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Browserify, Babel 6, Gulp - Unexpected token on spread operator(Browserify,Babel 6,Gulp - 傳播運算符上的意外令牌)
                  Is it possible to pass a flag to Gulp to have it run tasks in different ways?(是否可以將標志傳遞給 Gulp 以使其以不同的方式運行任務?)
                  Why do we need to install gulp globally and locally?(為什么我們需要在全局和本地安裝 gulp?)
                  How to run Gulp tasks sequentially one after the other(如何一個接一個地依次運行 Gulp 任務)
                  Stylesheet not loaded because of MIME-type(由于 MIME 類型而未加載樣式表)
                  Visual Studio 2015 crashes when opening Javascript files(打開 Javascript 文件時 Visual Studio 2015 崩潰)
                      <bdo id='IVtV4'></bdo><ul id='IVtV4'></ul>
                    • <tfoot id='IVtV4'></tfoot>
                        <tbody id='IVtV4'></tbody>
                    • <small id='IVtV4'></small><noframes id='IVtV4'>

                        <i id='IVtV4'><tr id='IVtV4'><dt id='IVtV4'><q id='IVtV4'><span id='IVtV4'><b id='IVtV4'><form id='IVtV4'><ins id='IVtV4'></ins><ul id='IVtV4'></ul><sub id='IVtV4'></sub></form><legend id='IVtV4'></legend><bdo id='IVtV4'><pre id='IVtV4'><center id='IVtV4'></center></pre></bdo></b><th id='IVtV4'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='IVtV4'><tfoot id='IVtV4'></tfoot><dl id='IVtV4'><fieldset id='IVtV4'></fieldset></dl></div>
                      1. <legend id='IVtV4'><style id='IVtV4'><dir id='IVtV4'><q id='IVtV4'></q></dir></style></legend>
                          • 主站蜘蛛池模板: 亚洲一二三区免费 | 久草色视频| 久久久久久久综合 | 精品中文字幕视频 | 久久久蜜桃 | 天天干国产 | 精品电影| www.精品国产 | 九九热在线精品视频 | 激情av | 天堂在线1| 国产精品资源在线 | 91精品免费视频 | 亚洲免费在线 | 国产剧情一区 | 欧美成年黄网站色视频 | 日韩免费三级 | 玖玖免费| 精品在线一区二区三区 | 欧美不卡视频一区发布 | 久久久爽爽爽美女图片 | 一区二区视频在线 | 成人在线不卡 | 一区二区在线看 | 免费在线观看成人av | 久久久99国产精品免费 | 日本成人中文字幕在线观看 | 欧美精品久久久久久久久久 | 国产精品亚洲精品日韩已方 | 国产精品视频在线播放 | 91色站 | 精品国产欧美一区二区 | 九九热精品在线视频 | av不卡一区 | 99热这里都是精品 | 青青草综合网 | 91视视频在线观看入口直接观看 | 国产精品一区在线观看 | 91.xxx.高清在线 | 欧美黄色片 | 国产一级在线观看 |