久久久久久久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ì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

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

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

                  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)容.總是.看起來是隨機(jī)的語言,但它總是一樣的.

                  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)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(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>

                            主站蜘蛛池模板: 久久久久国产精品午夜一区 | 成人h片在线观看 | 午夜激情一区 | 国产农村妇女精品一区 | 日韩中文字幕视频在线观看 | 一区二区三区四区国产 | 日本三级在线网站 | 欧美在线视频二区 | 国产美女网站 | 91就要激情 | 亚欧洲精品在线视频免费观看 | 欧美色综合天天久久综合精品 | 日本精品一区二区三区在线观看 | 日日天天 | 欧美视频二区 | 亚洲一区二区精品视频在线观看 | 国产最好的av国产大片 | 国产69精品久久久久777 | 黄色在线播放视频 | 亚洲 中文 欧美 日韩 在线观看 | 欧美日韩综合视频 | 久久人人网 | 久久久国产精品入口麻豆 | 欧美精品一区二区蜜桃 | 欧美精品一区二区三区视频 | 免费毛片网站 | 日韩中文在线 | 国产乱人伦 | 99视频免费看 | 国产综合精品一区二区三区 | 国产乱码精品一区二区三区中文 | 国产视频中文字幕 | 一区二区三区日韩 | 91资源在线 | 户外露出一区二区三区 | 自拍偷拍小视频 | 资源首页二三区 | 国产精品视频一二三区 | 2019天天干夜夜操 | 久久99精品久久久久久国产越南 | 美女天天操 |