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

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

<tfoot id='gNucD'></tfoot>

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

      1. 使用循環(huán)運(yùn)行 Gulp 任務(wù)

        Run Gulp tasks with loop(使用循環(huán)運(yùn)行 Gulp 任務(wù))
      2. <i id='Dt8rb'><tr id='Dt8rb'><dt id='Dt8rb'><q id='Dt8rb'><span id='Dt8rb'><b id='Dt8rb'><form id='Dt8rb'><ins id='Dt8rb'></ins><ul id='Dt8rb'></ul><sub id='Dt8rb'></sub></form><legend id='Dt8rb'></legend><bdo id='Dt8rb'><pre id='Dt8rb'><center id='Dt8rb'></center></pre></bdo></b><th id='Dt8rb'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Dt8rb'><tfoot id='Dt8rb'></tfoot><dl id='Dt8rb'><fieldset id='Dt8rb'></fieldset></dl></div>

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

            <tbody id='Dt8rb'></tbody>

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

                <bdo id='Dt8rb'></bdo><ul id='Dt8rb'></ul>
                <tfoot id='Dt8rb'></tfoot>

                • 本文介紹了使用循環(huán)運(yùn)行 Gulp 任務(wù)的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

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

                  我的 Gulp 任務(wù)有問(wèn)題.我使用一項(xiàng)任務(wù)來(lái)創(chuàng)建多個(gè)帶有 gulp-mustache 的 html 文件,因此最后我有兩個(gè)文件(index_de.html 和 index_en.html).我有一個(gè) .json 文件,其中包含字符串.一切正常.但我總是最終得到兩個(gè)文件都是 de 或 en,而不是每種語(yǔ)言一個(gè)文件.我已經(jīng)嘗試過(guò)使用循環(huán)[gulp]創(chuàng)建任務(wù),但這并沒(méi)有沒(méi)用.

                  I have a problem with my Gulp tasks. I use one task to create multiple html files with gulp-mustache, so that I have two files (index_de.html and index_en.html) at the end. I have a .json file, that contains the strings. It all works fine. But I always end up with either both files being de or en, instead of one file per language. I already tried creating tasks using a loop [gulp], but that doesn't work.

                  澄清:兩個(gè)文件包含相同的內(nèi)容.總是.看起來(lái)是隨機(jī)的語(yǔ)言,但它總是一樣的.

                  to clarify: Both files contain the same content. Always. Seems randomly what language it will be, but it's always the same.

                  我的 Gulp 任務(wù)如下所示:

                  My Gulp tasks looks like the following:

                  gulp.task('mustache', function () {
                    console.log('Found '+Object.keys(strings).length+' languages.');
                    for (var l in strings) {
                      var lang = strings[l];
                      (function(lang, l) {
                      gulp.src(buildpath+'/index.html')
                        .pipe(mustache(lang))
                        .pipe(rename('index_'+l+'.html'))
                        .pipe(compressor({
                          'remove-intertag-spaces': true,
                          'compress-js': true,
                          'compress-css': true
                        }))
                        .pipe(gulp.dest(destpath+'/'));
                      })(lang, l);
                    }
                  });
                  

                  推薦答案

                  我認(rèn)為這里的一個(gè)選項(xiàng)是合并一系列 gulp.src() 流并返回合并后的流.這是您的代碼修改為使用 merge-stream npm 包 (https://www.npmjs.com/package/merge-stream).

                  I think an option here is to merge a series of gulp.src() streams and return the merged streams. Here is your code modified to use the merge-stream npm package (https://www.npmjs.com/package/merge-stream).

                  var mergeStream = require('merge-stream');
                  
                  gulp.task('mustache', function () {
                      console.log('Found ' + Object.keys(strings).length + ' languages.');
                      var tasks = [];
                      for (var l in strings) {
                          var lang = strings[l];
                          tasks.push(
                              gulp.src(buildpath + '/index.html')
                                  .pipe(mustache(lang))
                                  .pipe(rename('index_' + l + '.html'))
                                  .pipe(compressor({
                                      'remove-intertag-spaces': true,
                                      'compress-js': true,
                                      'compress-css': true
                                  }))
                                  .pipe(gulp.dest(destpath + '/'))
                          );
                      }
                      return mergeStream(tasks);
                  });
                  

                  這篇關(guān)于使用循環(huán)運(yùn)行 Gulp 任務(wù)的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(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ù))
                  Stylesheet not loaded because of MIME-type(由于 MIME 類型而未加載樣式表)
                  Visual Studio 2015 crashes when opening Javascript files(打開 Javascript 文件時(shí) Visual Studio 2015 崩潰)

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

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

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

                            主站蜘蛛池模板: 亚洲国产精品一区二区久久 | 欧美精品成人影院 | 欧美精品乱码久久久久久按摩 | 欧美一区二区三区在线观看视频 | 午夜无码国产理论在线 | 久久久91精品国产一区二区三区 | 亚洲精品成人在线 | 免费毛片网站在线观看 | 久久精品国内 | 久久久这里都是精品 | 日韩一区二区免费视频 | 中文字幕在线观看一区 | www.日本在线播放 | 天天狠狠| 国产精品成人一区二区 | 国产一区二区免费电影 | 久久国产一区 | jizz中国日本 | 久久成人av电影 | 亚洲乱码国产乱码精品精98午夜 | 伦理二区 | 国产精品1区 | 久久国产精品99久久久久久丝袜 | 久久精品一 | 亚洲精品www | 日韩欧美在线观看 | 久久毛片 | 久草欧美 | 亚洲有码转帖 | 中文字幕二区 | 中国一级特黄视频 | 亚洲成人一区二区 | 黄色电影在线免费观看 | 玖玖国产精品视频 | 日韩爱爱网站 | 韩国av影院| 久久九九99| 黄网站在线播放 | 在线播放一区二区三区 | 精品www| 一区二区精品 |