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

    1. <legend id='tYzKJ'><style id='tYzKJ'><dir id='tYzKJ'><q id='tYzKJ'></q></dir></style></legend>

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

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

        如何使用 gulp-browserify 觀看多個文件但只處理一個

        How do I watch multiple files with gulp-browserify but process only one?(如何使用 gulp-browserify 觀看多個文件但只處理一個文件?)

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

          <legend id='jGvtW'><style id='jGvtW'><dir id='jGvtW'><q id='jGvtW'></q></dir></style></legend>
              <tbody id='jGvtW'></tbody>
            <tfoot id='jGvtW'></tfoot>

              <bdo id='jGvtW'></bdo><ul id='jGvtW'></ul>
                  <i id='jGvtW'><tr id='jGvtW'><dt id='jGvtW'><q id='jGvtW'><span id='jGvtW'><b id='jGvtW'><form id='jGvtW'><ins id='jGvtW'></ins><ul id='jGvtW'></ul><sub id='jGvtW'></sub></form><legend id='jGvtW'></legend><bdo id='jGvtW'><pre id='jGvtW'><center id='jGvtW'></center></pre></bdo></b><th id='jGvtW'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='jGvtW'><tfoot id='jGvtW'></tfoot><dl id='jGvtW'><fieldset id='jGvtW'></fieldset></dl></div>
                • 本文介紹了如何使用 gulp-browserify 觀看多個文件但只處理一個文件?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我正在嘗試連接 gulp-browserifygulp-watch 每次源文件更改.但是,gulp-browserify 需要一個單一的編譯入口點(例如 src/js/app.js)并自行獲取每個依賴項:

                  I'm trying to wire up gulp-browserify and gulp-watch to rebuild my bundle each time a source file changes. However, gulp-browserify requires a single entry point for the compilation (e.g. src/js/app.js) and fetches every dependency itself:

                  gulp.src('src/js/app.js')
                      .pipe(browserify())
                      .pipe(gulp.dest('dist'))
                  

                  但是,使用 gulp-watch 無法在每次更改時重建,因為只監視入口點文件.我真正需要的是可以查看多個文件,然后只處理入口點文件(查找 replaceEverythingWithEntryPointFile):

                  However, with gulp-watch this fails to rebuild on every change because only the entry point file is being watched. What I actually need is a possibility to watch multiple files and then process only the entry point file (look for replaceEverythingWithEntryPointFile):

                  gulp.src("src/**/*.js")
                      .pipe(watch())
                      .pipe(replaceEverythingWithEntryPointFile()) // <- This is what I need
                      .pipe(browserify())
                      .pipe(gulp.dest("dist"));
                  

                  所以問題是:如何將 gulp-browserify 指向入口點文件并在任何源文件的更改時觸發重建?如果解決方案包括限制會很好:啟動時,每個源文件都被設置為觀看,因此我們的入口點文件將通過管道傳輸到 gulp-browserify 與文件一樣多,這是不必要的.

                  So the question is: how can I point gulp-browserify to the entry point file and trigger rebuild on a change in any source file? Would be nice if the solution included throttling: when starting up, every source file is being set up for watching and thus our entry point file would be piped to gulp-browserify as many times as there are files, which is unnecessary.

                  推薦答案

                  只要調用一個正常的文件更改任務,像這樣:

                  Just call a normal task on file change, like this:

                  gulp.task("build-js", function() {
                      return gulp.src('src/js/app.js')
                          .pipe(browserify())
                          .pipe(gulp.dest('dist'))
                  });
                  
                  gulp.task("watch", function() {
                      // calls "build-js" whenever anything changes
                      gulp.watch("src/**/*.js", ["build-js"]);
                  });
                  

                  如果你想使用 gulp-watch(因為它可以查找新文件),那么你需要這樣做:

                  If you want to use gulp-watch (because it can look for new files), then you need to do something like this:

                  gulp.task("watch", function() {
                      watch({glob: "src/**/*.js"}, function() {
                          gulp.start("build-js");
                      });
                  });
                  

                  使用 gulp-watch 還具有批處理操作的好處,因此如果您一次修改多個文件,您將不會連續獲得一堆構建.

                  Using gulp-watch also has the benefit of batching operations, so if you modify several files at once, you won't get a bunch of builds in a row.

                  這篇關于如何使用 gulp-browserify 觀看多個文件但只處理一個文件?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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='LTh7o'></bdo><ul id='LTh7o'></ul>
                  • <legend id='LTh7o'><style id='LTh7o'><dir id='LTh7o'><q id='LTh7o'></q></dir></style></legend><tfoot id='LTh7o'></tfoot>
                      <tbody id='LTh7o'></tbody>

                    • <small id='LTh7o'></small><noframes id='LTh7o'>

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

                            主站蜘蛛池模板: 日韩精品一二区 | 午夜时刻免费入口 | 日本美女黄色 | 国产深夜福利 | 一区二区三区在线观看视频 | 精品国产一二三 | 久久精品黄色 | 欧美视频区 | 爱福利视频网 | 色99999| 四虎网站 | 天天干干干 | 欧美日韩一区二区在线观看 | 日本理论片午伦夜理片在线观看 | 午夜一级视频 | 精品国产福利 | 日本久久网 | 香蕉成人网 | 国产福利在线视频 | 色婷婷导航 | 欧洲一区二区三区 | 中文字幕中文字幕 | 国产草草影院 | 97中文字幕| av黄色在线观看 | 色综合五月 | 久久久久久久 | 亚洲福利网站 | 国产精品一区av | 一区二区福利 | 九九九视频 | 综合网av| 国产精品1区2区3区 国产乱码精品一区二区三 成人区精品一区二区婷婷 www.欧美日韩 | 中文字幕在线观看第一页 | 欧美激情在线播放 | 亚洲日本视频 | 91播放| 麻豆一区二区三区 | 美女黄色一级片 | 免费激情网站 | 六月丁香综合 |