pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

  • <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="a0iwco0" 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="0s024cq" 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="ewmmskq" id='ry6Fi'><tfoot id='ry6Fi'></tfoot><dl id='ry6Fi'><fieldset id='ry6Fi'></fieldset></dl></div>

                            主站蜘蛛池模板: 扒渣机,铁水扒渣机,钢水扒渣机,铁水捞渣机,钢水捞渣机-烟台盛利达工程技术有限公司 | 步进_伺服_行星减速机,微型直流电机,大功率直流电机-淄博冠意传动机械 | 贵州科比特-防雷公司厂家提供贵州防雷工程,防雷检测,防雷接地,防雷设备价格,防雷产品报价服务-贵州防雷检测公司 | 304不锈钢无缝管_不锈钢管厂家 - 隆达钢业集团有限公司 | 东莞办公家具厂家直销-美鑫【免费3D效果图】全国办公桌/会议桌定制 | 刹车盘机床-刹车盘生产线-龙口亨嘉智能装备 | Safety light curtain|Belt Sway Switches|Pull Rope Switch|ultrasonic flaw detector-Shandong Zhuoxin Machinery Co., Ltd | 千斤顶,液压千斤顶-力良企业,专业的液压千斤顶制造商,shliliang.com | 伊卡洛斯软装首页-电动窗帘,别墅窗帘,定制窗帘,江浙沪1000+别墅窗帘案例 | 国际船舶网 - 船厂、船舶、造船、船舶设备、航运及海洋工程等相关行业综合信息平台 | 苏州西朗门业-欧盟CE|莱茵UL双认证的快速卷帘门品牌厂家 | 政府回应:200块在义乌小巷能买到爱情吗?——揭秘打工族省钱约会的生存智慧 | 自动化生产线-自动化装配线-直流电机自动化生产线-东莞市慧百自动化有限公司 | 立式硫化罐-劳保用品硫化罐-厂家直销-山东鑫泰鑫硫化罐厂家 | 高效节能电机_伺服主轴电机_铜转子电机_交流感应伺服电机_图片_型号_江苏智马科技有限公司 | 证券新闻,热播美式保罗1984第二部_腾讯1080p-仁爱影院 | 纯化水设备-EDI-制药-实验室-二级反渗透-高纯水|超纯水设备 | PE一体化污水处理设备_地埋式生活污水净化槽定制厂家-岩康塑业 | 天津力值检测-天津管道检测-天津天诚工程检测技术有限公司 | 石家庄救护车出租_重症转院_跨省跨境医疗转送_活动赛事医疗保障_康复出院_放弃治疗_腾康26年医疗护送转诊团队 | 吸污车_吸粪车_抽粪车_电动三轮吸粪车_真空吸污车_高压清洗吸污车-远大汽车制造有限公司 | 欧美日韩国产一区二区三区不_久久久久国产精品无码不卡_亚洲欧洲美洲无码精品AV_精品一区美女视频_日韩黄色性爱一级视频_日本五十路人妻斩_国产99视频免费精品是看4_亚洲中文字幕无码一二三四区_国产小萍萍挤奶喷奶水_亚洲另类精品无码在线一区 | 专业音响设备_舞台音响设备_会议音响工程-首选深圳一禾科技 | 小型单室真空包装机,食品单室真空包装机-百科 | 嘉兴恒升声级计-湖南衡仪声级计-杭州爱华多功能声级计-上海邦沃仪器设备有限公司 | 间苯二酚,间苯二酚厂家-淄博双和化工 | Copeland/谷轮压缩机,谷轮半封闭压缩机,谷轮涡旋压缩机,型号规格,技术参数,尺寸图片,价格经销商 CTP磁天平|小电容测量仪|阴阳极极化_双液系沸点测定仪|dsj电渗实验装置-南京桑力电子设备厂 | 楼承板-钢筋楼承板-闭口楼承板-无锡优贝斯楼承板厂 | 发光字|标识设计|标牌制作|精神堡垒 - 江苏苏通广告有限公司 | 餐饮加盟网_特色餐饮连锁加盟店-餐饮加盟官网 | 美名宝起名网-在线宝宝、公司、起名平台| 山东锐智科电检测仪器有限公司_超声波测厚仪,涂层测厚仪,里氏硬度计,电火花检漏仪,地下管线探测仪 | 数显恒温培养摇床-卧式/台式恒温培养摇床|朗越仪器 | 篮球架_乒乓球台_足球门_校园_竞技体育器材_厂家_价格-沧州浩然体育器材有限公司 | 重庆网站建设,重庆网站设计,重庆网站制作,重庆seo,重庆做网站,重庆seo,重庆公众号运营,重庆小程序开发 | 安全光栅|射频导纳物位开关|音叉料位计|雷达液位计|两级跑偏开关|双向拉绳开关-山东卓信机械有限公司 | 中矗模型-深圳中矗模型设计有限公司 | 奇酷教育-Python培训|UI培训|WEB大前端培训|Unity3D培训|HTML5培训|人工智能培训|JAVA开发的教育品牌 | 电动垃圾车,垃圾清运车-江苏速利达机车有限公司 | 安徽免检低氮锅炉_合肥燃油锅炉_安徽蒸汽发生器_合肥燃气锅炉-合肥扬诺锅炉有限公司 | MTK核心板|MTK开发板|MTK模块|4G核心板|4G模块|5G核心板|5G模块|安卓核心板|安卓模块|高通核心板-深圳市新移科技有限公司 |