久久久久久久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. 在繼續下一個任務之前使 gulp 同步寫入文件

        Making gulp write files synchronously before moving on to the next task(在繼續下一個任務之前使 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>

                  本文介紹了在繼續下一個任務之前使 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 任務已經完成,但它應該寫入操作系統的文件還沒有完全到位.我注意到,如果我在瀏覽器捆綁命令中添加了一個 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.

                  這篇關于在繼續下一個任務之前使 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>
                          • 主站蜘蛛池模板: 午夜久久久 | 欧美在线视频一区 | 亚洲午夜在线观看 | 免费一级黄色片 | 日本熟妇毛耸耸xxxxxx | 少妇搡bbbb搡bbb搡澳门 | 日本欧美久久久久免费播放网 | 精品久久久久久久 | 亚洲免费在线视频 | 国产视频一区二区三区四区 | 国产高潮在线 | 久久久二区 | 日韩aaaa| 亚洲人网站 | 亚洲免费播放 | 欧美综合久久 | 美日韩一区二区 | 黄色一级在线观看 | 久久都是精品 | 在线理论片 | 天天视频国产 | 久久新视频 | 国产精品美女在线 | 九九精品免费视频 | 欧美性猛交xxxx乱大交退制版 | 草草视频在线 | 日本黄色免费看 | 中文字幕黄色片 | 丁香av| www.久久.com | 老司机精品福利视频 | 日本黄色免费 | 国产成人精品三级麻豆 | 亚洲精品在线免费 | 午夜看看 | 三级a毛片 | 国产精品一区二区三区免费 | 亚洲第一黄网 | 国产三级在线观看视频 | 黄色a毛片 | 国产一区在线视频 |