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

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

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

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

        • <bdo id='vup66'></bdo><ul id='vup66'></ul>

        無法讓 gulp-rev-replace 與 gulp-useref 一起使用

        Can#39;t get gulp-rev-replace working with gulp-useref(無法讓 gulp-rev-replace 與 gulp-useref 一起使用)
              <i id='kNCT4'><tr id='kNCT4'><dt id='kNCT4'><q id='kNCT4'><span id='kNCT4'><b id='kNCT4'><form id='kNCT4'><ins id='kNCT4'></ins><ul id='kNCT4'></ul><sub id='kNCT4'></sub></form><legend id='kNCT4'></legend><bdo id='kNCT4'><pre id='kNCT4'><center id='kNCT4'></center></pre></bdo></b><th id='kNCT4'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='kNCT4'><tfoot id='kNCT4'></tfoot><dl id='kNCT4'><fieldset id='kNCT4'></fieldset></dl></div>

              1. <small id='kNCT4'></small><noframes id='kNCT4'>

              2. <legend id='kNCT4'><style id='kNCT4'><dir id='kNCT4'><q id='kNCT4'></q></dir></style></legend>
                  <tbody id='kNCT4'></tbody>
                <tfoot id='kNCT4'></tfoot>
                  <bdo id='kNCT4'></bdo><ul id='kNCT4'></ul>

                • 本文介紹了無法讓 gulp-rev-replace 與 gulp-useref 一起使用的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  繼續我之前的 問題 - 但這次是下一步:讓文件修訂工作.

                  Continuing my previous question - but this time is the next step: getting file revisions to work.

                  我正在學習 johnpapa 的 Gulp 自動化課程,但似乎遇到了另一面墻(當您嘗試將簡明課程調整為不同的文件結構時,您會遇到這種情況:P).

                  I'm working through johnpapa's course on automation with Gulp and seem to hit another wall (that's what you get when you try to adapt a concise course to a different file structure :P ).

                  基本上,問題是我確實得到了帶有修訂名稱的文件,但是這些名稱沒有進入最終結果 test.jsp,我不知道為什么...

                  Basically, the issue is that I do get files named with a revision, but those names do not get into the end-result test.jsp, and I can't figure out why...

                  這是任務(為簡潔起見省略了縮小,但它適用于文件修訂):

                  This is the task (the minification is omitted for brevity, but it works fine with the file revisioning):

                  gulp.task('build-dev', ['inject'], function () {
                  
                      var assets = $.useref.assets({searchPath: ''});
                  
                      return gulp
                          .src(config.indexFile)
                          .pipe($.rename('test.jsp'))
                          .pipe($.plumber())
                          .pipe(assets)
                          .pipe($.rev())
                          .pipe(assets.restore())
                          .pipe($.useref())
                          .pipe($.revReplace({modifyUnreved: replaceDirectory, modifyReved: replaceDirectory}))
                          .pipe(gulp.dest(config.indexLocation))
                          .pipe($.rev.manifest())
                          .pipe(gulp.dest(config.indexLocation))
                          ;
                  });
                  

                  inject 是將css和js引用注入索引文件的任務(正常工作),$require('gulp-load-plugins')({lazy: true})config.indexFileindex.jsp.

                  inject is the task that injects css and js references to the index file (works correctly), $ is require('gulp-load-plugins')({lazy: true}) and config.indexFile is index.jsp.

                  replaceDirectory 函數是(使用因為 rev-manifest 生成完整路徑名):

                  The replaceDirectory function is (used since the rev-manifest generates full pathnames):

                  function replaceDirectory(path) {
                  
                      var strToReplace = '../..';
                      var strToReplaceWith = process.cwd().replace(/\/g, '/') + '/WebContent';
                  
                      if (path) {
                          return path.replace(strToReplace, strToReplaceWith);
                      } else {
                          return path;
                      }
                  }
                  

                  我的文件結構(與課程中的不同)是:

                  My file structure (unlike the one in the course) is:

                  - ModuleDir
                      - dist
                          - css
                              - lib.css
                              - app.css
                          - fonts
                          - images
                          - js
                              - lib.js
                              - app.js
                      - css
                      - js
                      - web-app
                          - InnerDir
                              - index.jsp
                              - test.jsp
                      - package.json, bower.json, etc. (all the required files)
                  

                  基本上,index.jsp 是針對 CSS 和 JS 庫和應用程序資產進行處理的,這些資產被縮小并連接成 lib.css、lib.js、app.css 和 app.js.之后,所有這些都被注入到 index.jsp 的副本中,該副本稱為 test.jsp.

                  Basically, index.jsp is processed for CSS and JS library and application assets, which are minified and concatenated into lib.css, lib.js, app.css and app.js. Later all these are injected into a copy of index.jsp which is called test.jsp.

                  資產收集、連接、注入工作和磁盤上的文件修改工作出色.test.jsp中文件名的更新——沒那么多...

                  The asset gathering, concatenation, injection works and file revisions on disk work splendidly. The update of file names in test.jsp- not so much...

                  任何想法或指針將不勝感激.

                  Any ideas or pointers will be appreciated.

                  推薦答案

                  您必須將 replaceInExtensions: '.jsp' 添加到 revReplace() 的選項中.

                  You have to add replaceInExtensions: '.jsp' to your options for revReplace().

                  在我查看插件代碼并弄清楚之前,我遇到了這個問題一天半.我正在使用 .php 文件.文檔確實說您需要這樣做,但很容易錯過.

                  I had this problem for a day and a half before I looked at the plugin code and figured it out. I'm using .php files. The documentation does say you need to do this but it's easily missed.

                  希望對你有幫助.

                  這篇關于無法讓 gulp-rev-replace 與 gulp-useref 一起使用的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 崩潰)
                  <tfoot id='ry6Fi'></tfoot>

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

                          <tbody id='ry6Fi'></tbody>

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

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

                            主站蜘蛛池模板: 9久9久9久女女女九九九一九 | 欧美精品一区二区三区蜜桃视频 | 99久久久99久久国产片鸭王 | 日本视频在线播放 | 亚洲视频 欧美视频 | 欧美性精品 | 国产成人高清视频 | 欧美一级大片 | 日本不卡一区二区三区在线观看 | 在线不卡一区 | 久久国内精品 | 狠狠干av | 亚洲第一区久久 | 午夜激情国产 | 天天色综| 精品一区二区久久久久久久网精 | 亚洲精选久久 | 日韩中文视频 | 午夜影院在线观看 | 欧美久久一级特黄毛片 | 国产福利在线 | 粉嫩av久久一区二区三区 | 香蕉婷婷| 三级黄色片在线播放 | 女人精96xxx免费网站p | 91视视频在线观看入口直接观看 | 欧美亚洲日本 | 久草在线 | 久久精品中文 | 国产免费又黄又爽又刺激蜜月al | 日韩精品在线网站 | 一区二区三区电影在线观看 | 99久久免费精品视频 | 91精品在线播放 | 日韩成人在线免费视频 | 日韩乱码一二三 | 羞羞网站免费观看 | 日韩欧美一级片 | 亚洲人在线播放 | 精品一区二区在线观看 | 欧美精品网站 |