久久久久久久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 輸出多個(gè)包

        how to output multiple bundles with browserify and gulp(如何使用 browserify 和 gulp 輸出多個(gè)包)
          • <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 輸出多個(gè)包的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  限時(shí)送ChatGPT賬號(hào)..

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

                  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"));
                  
                  });
                  

                  顯然這行不通,因?yàn)槲抑恢付艘粋€(gè)輸出 (bundle.js).我可以通過像這樣重復(fù)上述語句來實(shí)現(xiàn)這一點(diǎn)(但感覺不對(duì),因?yàn)橹貜?fù)):

                  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"));
                  
                  });
                  

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

                  Is there a better way to tackle this? Thanks!

                  推薦答案

                  我現(xiàn)在沒有一個(gè)好的環(huán)境來測試這個(gè),但我猜它看起來像:

                  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));
                  
                  });
                  

                  我剛剛意識(shí)到我誤讀了這個(gè)問題,應(yīng)該有兩個(gè)單獨(dú)的包來自兩個(gè)單獨(dú)的 .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"]);
                  });
                  

                  這篇關(guān)于如何使用 browserify 和 gulp 輸出多個(gè)包的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  Browserify, Babel 6, Gulp - Unexpected token on spread operator(Browserify,Babel 6,Gulp - 傳播運(yùn)算符上的意外令牌)
                  Is it possible to pass a flag to Gulp to have it run tasks in different ways?(是否可以將標(biāo)志傳遞給 Gulp 以使其以不同的方式運(yùn)行任務(wù)?)
                  Why do we need to install gulp globally and locally?(為什么我們需要在全局和本地安裝 gulp?)
                  How to run Gulp tasks sequentially one after the other(如何一個(gè)接一個(gè)地依次運(yùn)行 Gulp 任務(wù))
                  Visual Studio 2015 crashes when opening Javascript files(打開 Javascript 文件時(shí) 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>
                            主站蜘蛛池模板: 综合网视频 | 国产精品久久久亚洲 | 欧美中文字幕在线观看 | 国产成人久久精品一区二区三区 | 一区二区中文字幕 | 亚洲男人天堂av | 久久精品国产亚洲一区二区 | 欧洲免费毛片 | 在线免费观看一区二区 | 国产精品久久 | 国产日韩欧美精品一区二区 | 亚洲电影专区 | 国产成人免费在线 | 日本欧美在线观看视频 | 国产在线视频一区二区 | 91国语清晰打电话对白 | 国产一区二区精品在线 | 一级黄色片免费在线观看 | 亚洲欧美另类在线观看 | 日韩av一区二区在线观看 | 午夜精品福利视频 | 91精品国产综合久久精品图片 | 国产一区二区三区四区 | 国产精品欧美日韩 | 一级毛片观看 | 综合精品 | 国产精品入口久久 | 久久另类| 亚洲精品久久嫩草网站秘色 | 99re热精品视频 | 91视频在线看 | 一区二区三区国产视频 | 一区二区三区网站 | 91精品久久久久久久 | 一区二区精品视频 | www.99re| 美女视频久久 | 久久亚洲春色中文字幕久久久 | 欧美激情在线精品一区二区三区 | 中文字幕亚洲一区二区三区 | 国产欧美在线一区二区 |