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

  • <small id='2QoaD'></small><noframes id='2QoaD'>

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

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

        如何使用 browserify 和 gulp 輸出多個包

        how to output multiple bundles with browserify and gulp(如何使用 browserify 和 gulp 輸出多個包)
          • <i id='IPx4U'><tr id='IPx4U'><dt id='IPx4U'><q id='IPx4U'><span id='IPx4U'><b id='IPx4U'><form id='IPx4U'><ins id='IPx4U'></ins><ul id='IPx4U'></ul><sub id='IPx4U'></sub></form><legend id='IPx4U'></legend><bdo id='IPx4U'><pre id='IPx4U'><center id='IPx4U'></center></pre></bdo></b><th id='IPx4U'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='IPx4U'><tfoot id='IPx4U'></tfoot><dl id='IPx4U'><fieldset id='IPx4U'></fieldset></dl></div>
            <tfoot id='IPx4U'></tfoot>

              <legend id='IPx4U'><style id='IPx4U'><dir id='IPx4U'><q id='IPx4U'></q></dir></style></legend>

                <bdo id='IPx4U'></bdo><ul id='IPx4U'></ul>

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

                    <tbody id='IPx4U'></tbody>
                • 本文介紹了如何使用 browserify 和 gulp 輸出多個包的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我有 browserify 捆綁文件,它工作得很好.但是如果我需要生成多個捆綁包怎么辦?

                  I have browserify bundling up files and it's working great. But what if I need to generate multiple bundles?

                  我想以 dist/appBundle.jsdist/publicBundle.js

                  gulp.task("js", function(){
                  
                      return browserify([
                              "./js/app.js",
                              "./js/public.js"
                          ])
                          .bundle()
                          .pipe(source("bundle.js"))
                          .pipe(gulp.dest("./dist"));
                  
                  });
                  

                  顯然這行不通,因為我只指定了一個輸出 (bundle.js).我可以通過像這樣重復上述語句來實現這一點(但感覺不對,因為重復):

                  Obviously this isn't going to work since I am only specifying one output (bundle.js). I can accomplish this by repeating the above statement like so (but it doesn't feel right, because of the repetition):

                  gulp.task("js", function(){
                  
                      browserify([
                              "./js/app.js"
                          ])
                          .bundle()
                          .pipe(source("appBundle.js"))
                          .pipe(gulp.dest("./dist"));
                  
                  
                      browserify([
                              "./js/public.js"
                          ])
                          .bundle()
                          .pipe(source("publicBundle.js"))
                          .pipe(gulp.dest("./dist"));
                  
                  });
                  

                  有沒有更好的方法來解決這個問題?謝謝!

                  Is there a better way to tackle this? Thanks!

                  推薦答案

                  我現在沒有一個好的環境來測試這個,但我猜它看起來像:

                  I don't have a good environment to test this in right now, but my guess is that it would look something like:

                  gulp.task("js", function(){
                      var destDir = "./dist";
                  
                      return browserify([
                          "./js/app.js",
                          "./js/public.js"
                      ])
                          .bundle()
                          .pipe(source("appBundle.js"))
                          .pipe(gulp.dest(destDir))
                          .pipe(rename("publicBundle.js"))
                          .pipe(gulp.dest(destDir));
                  
                  });
                  

                  我剛剛意識到我誤讀了這個問題,應該有兩個單獨的包來自兩個單獨的 .js 文件.鑒于此,我能想到的最佳選擇如下:

                  I just realized I mis-read the question, there should be two separate bundles coming from two separate .js files. In light of that, the best alternative I can think of looks like:

                  gulp.task("js", function(){
                      var destDir = "./dist";
                  
                      var bundleThis = function(srcArray) {
                          _.each(srcArray, function(source) {
                              var bundle = browserify(["./js/" + source + ".js"]).bundle();
                              bundle.pipe(source(source + "Bundle.js"))
                                    .pipe(gulp.dest(destDir));
                          });
                      };
                  
                      bundleThis(["app", "public"]);
                  });
                  

                  這篇關于如何使用 browserify 和 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 任務)
                  Visual Studio 2015 crashes when opening Javascript files(打開 Javascript 文件時 Visual Studio 2015 崩潰)
                  Detect FLASH plugin crashes(檢測 FLASH 插件崩潰)

                  1. <tfoot id='zKLGG'></tfoot>

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

                      <legend id='zKLGG'><style id='zKLGG'><dir id='zKLGG'><q id='zKLGG'></q></dir></style></legend>

                          <tbody id='zKLGG'></tbody>
                        1. <small id='zKLGG'></small><noframes id='zKLGG'>

                          • <bdo id='zKLGG'></bdo><ul id='zKLGG'></ul>
                            主站蜘蛛池模板: 国产精品久久777777 | 都市激情亚洲 | 中文成人无字幕乱码精品 | 91精品国产综合久久精品 | 视频一区二区三区四区五区 | 欧美一区二区在线 | 亚洲一区二区三区在线视频 | 不卡在线视频 | 91成人在线| 一级片网址| 久久99精品视频 | 国产乱精品一区二区三区 | 国产色婷婷 | 日本精a在线观看 | 日韩a v在线免费观看 | 999久久久久久久久 国产欧美在线观看 | 在线午夜电影 | 亚洲va国产日韩欧美精品色婷婷 | 国产精品美女久久久久久免费 | 国产亚洲一区二区三区在线观看 | 羞羞涩涩在线观看 | 国产在线精品一区二区三区 | 欧美成人免费在线 | 欧美精品一区二区三区在线 | 国产91在线播放 | 狠狠的日 | 亚洲一区二区三区在线 | 91看片免费 | 99资源站 | 中国大陆高清aⅴ毛片 | 欧美高清视频 | 欧美综合一区二区三区 | 午夜手机在线 | 99精品九九| av手机免费在线观看 | 羞羞涩涩在线观看 | 黄色网址在线免费播放 | 就操在线 | 福利视频网站 | 少妇久久久久 | 久久久999国产精品 中文字幕在线精品 |