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

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

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

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

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

      • <bdo id='lLseo'></bdo><ul id='lLseo'></ul>
      1. Gulp 使用 @import 監視和編譯更少的文件

        Gulp watch and compile less files with @import(Gulp 使用 @import 監視和編譯更少的文件)

              <small id='6MMaf'></small><noframes id='6MMaf'>

                  <tbody id='6MMaf'></tbody>
              1. <tfoot id='6MMaf'></tfoot><legend id='6MMaf'><style id='6MMaf'><dir id='6MMaf'><q id='6MMaf'></q></dir></style></legend>
                  <bdo id='6MMaf'></bdo><ul id='6MMaf'></ul>
                • <i id='6MMaf'><tr id='6MMaf'><dt id='6MMaf'><q id='6MMaf'><span id='6MMaf'><b id='6MMaf'><form id='6MMaf'><ins id='6MMaf'></ins><ul id='6MMaf'></ul><sub id='6MMaf'></sub></form><legend id='6MMaf'></legend><bdo id='6MMaf'><pre id='6MMaf'><center id='6MMaf'></center></pre></bdo></b><th id='6MMaf'></th></span></q></dt></tr></i><div class="wgwoeia" id='6MMaf'><tfoot id='6MMaf'></tfoot><dl id='6MMaf'><fieldset id='6MMaf'></fieldset></dl></div>
                  本文介紹了Gulp 使用 @import 監視和編譯更少的文件的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我正試圖用 gulp 來觀察和編譯一個 .less 項目 + livereload.我有一個使用 @import 的 style.less 文件.當我運行 gulp 任務時,它似乎不理解導入.當我修改主文件時,gulp 會編譯文件并刷新瀏覽器,但如果我只修改導入,則更改將被忽略.

                  I'm trying to get my head around gulp to watch and compile a .less project + livereload. I have a style.less file which use @import. When i run the gulp task it doesn't seem to understand the imports. When I modify the main less file, gulp compiles the file and refresh the browser but if i modify only an import, the changes are ignored.

                  這是我的 gulpfile.js

                  Here is my gulpfile.js

                  var gulp = require('gulp');
                  var less = require('gulp-less');
                  var watch = require('gulp-watch');
                  var prefix = require('gulp-autoprefixer');
                  var plumber = require('gulp-plumber');
                  var livereload = require('gulp-livereload');
                  var path = require('path');
                  
                  gulp.task('default', function() {
                      return gulp.src('./style.less')
                          .pipe(watch())
                          .pipe(plumber())
                          .pipe(less({
                            paths: ['./', './overrides/']
                          }))
                          .pipe(prefix("last 8 version", "> 1%", "ie 8", "ie 7"), {cascade:true})
                          .pipe(gulp.dest('./'))
                          .pipe(livereload());
                  });
                  

                  我嘗試在 gulp.src('./*.less') 中不指定主文件名,但是所有的 less 文件都是單獨編譯的.

                  I tried not specifying the main file name in gulp.src('./*.less') but then all of the less files are compiled indvidually.

                  謝謝

                  推薦答案

                  現在您正在打開單個 gulp.src 文件,并觀看使用 gulp 打開文件后.下面將把 watch 和 src 分成兩個任務,允許單獨的 file 和 src 觀看.

                  Right now you are opening the single gulp.src file, and watching After you open the file with gulp. The following will split the watching and src into two tasks, allowing for separate file and src watching.

                  var gulp = require('gulp');
                  var less = require('gulp-less');
                  var watch = require('gulp-watch');
                  var prefix = require('gulp-autoprefixer');
                  var plumber = require('gulp-plumber');
                  var livereload = require('gulp-livereload');
                  var path = require('path');
                  
                  gulp.task('less', function() {
                      return gulp.src('./style.less')  // only compile the entry file
                          .pipe(plumber())
                          .pipe(less({
                            paths: ['./', './overrides/']
                          }))
                          .pipe(prefix("last 8 version", "> 1%", "ie 8", "ie 7"), {cascade:true})
                          .pipe(gulp.dest('./'))
                          .pipe(livereload());
                  });
                  gulp.task('watch', function() {
                      gulp.watch('./*.less', ['less']);  // Watch all the .less files, then run the less task
                  });
                  
                  gulp.task('default', ['watch']); // Default will run the 'entry' watch task
                  

                  當使用 *.less 找到的任何文件被更改時,它將運行僅編譯 src 文件的任務.@imports 應該被正確地包含",如果沒有檢查導入設置.

                  When Any of the files found with *.less are altered it will then run the task which will compile just the src file. The @imports should be 'included' correctly, if not check the import settings.

                  這篇關于Gulp 使用 @import 監視和編譯更少的文件的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 崩潰)

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

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

                      • <bdo id='hndgw'></bdo><ul id='hndgw'></ul>
                          <tfoot id='hndgw'></tfoot>
                          • <legend id='hndgw'><style id='hndgw'><dir id='hndgw'><q id='hndgw'></q></dir></style></legend>
                            主站蜘蛛池模板: 湖南自考_湖南自学考试 | 合金ICP光谱仪(磁性材料,工业废水)-百科 | 便携式谷丙转氨酶检测仪|华图生物科技百科 | 发光字|标识设计|标牌制作|精神堡垒 - 江苏苏通广告有限公司 | 行吊_电动单梁起重机_双梁起重机_合肥起重机_厂家_合肥市神雕起重机械有限公司 | 网站建设-临朐爱采购-抖音运营-山东兆通网络科技 | 废气处理设备-工业除尘器-RTO-RCO-蓄热式焚烧炉厂家-江苏天达环保设备有限公司 | 纯水电导率测定仪-万用气体检测仪-低钠测定仪-米沃奇科技(北京)有限公司www.milwaukeeinst.cn 锂辉石检测仪器,水泥成分快速分析仪-湘潭宇科分析仪器有限公司 手术室净化装修-手术室净化工程公司-华锐手术室净化厂家 | ISO9001认证咨询_iso9001企业认证代理机构_14001|18001|16949|50430认证-艾世欧认证网 | 铝合金线槽_铝型材加工_空调挡水板厂家-江阴炜福金属制品有限公司 | 液氮罐_液氮容器_自增压液氮罐-北京君方科仪科技发展有限公司 | 硬度计,金相磨抛机_厂家-莱州华煜众信试验仪器有限公司 | 压缩空气检测_气体_水质找上海京工-服务专业、价格合理 | 整车VOC采样环境舱-甲醛VOC预处理舱-多舱法VOC检测环境仓-上海科绿特科技仪器有限公司 | 尚为传动-专业高精密蜗轮蜗杆,双导程蜗轮蜗杆,蜗轮蜗杆减速机,蜗杆减速机生产厂家 | 热风机_工业热风机生产厂家上海冠顶公司提供专业热风机图片价格实惠 | 铝板冲孔网,不锈钢冲孔网,圆孔冲孔网板,鳄鱼嘴-鱼眼防滑板,盾构走道板-江拓数控冲孔网厂-河北江拓丝网有限公司 | 不锈钢水箱生产厂家_消防水箱生产厂家-河南联固供水设备有限公司 | 产业规划_产业园区规划-产业投资选址及规划招商托管一体化服务商-中机院产业园区规划网 | 济南办公室装修-厂房装修-商铺装修-工装公司-山东鲁工装饰设计 | 玻璃钢型材-玻璃钢风管-玻璃钢管道,生产厂家-[江苏欧升玻璃钢制造有限公司] | 蒸汽热收缩机_蒸汽发生器_塑封机_包膜机_封切收缩机_热收缩包装机_真空机_全自动打包机_捆扎机_封箱机-东莞市中堡智能科技有限公司 | 全国国际学校排名_国际学校招生入学及学费-学校大全网 | 校园气象站_超声波气象站_农业气象站_雨量监测站_风途科技 | 湖南成人高考报名-湖南成考网| 防渗膜厂家|养殖防渗膜|水产养殖防渗膜-泰安佳路通工程材料有限公司 | 三氯异氰尿酸-二氯-三氯-二氯异氰尿酸钠-优氯净-强氯精-消毒片-济南中北_优氯净厂家 | 食品无尘净化车间,食品罐装净化车间,净化车间配套风淋室-青岛旭恒洁净技术有限公司 | 干粉砂浆设备_干混砂浆生产线_腻子粉加工设备_石膏抹灰砂浆生产成套设备厂家_干粉混合设备_砂子烘干机--郑州铭将机械设备有限公司 | 探鸣起名网-品牌起名-英文商标起名-公司命名-企业取名包满意 | 深圳希玛林顺潮眼科医院(官网)│深圳眼科医院│医保定点│香港希玛林顺潮眼科中心连锁品牌 | LNG鹤管_内浮盘价格,上装鹤管,装车撬厂家-连云港赛威特机械 | 共享雨伞_共享童车_共享轮椅_共享陪护床-共享产品的领先者_有伞科技 | 凝胶成像仪,化学发光凝胶成像系统,凝胶成像分析系统-上海培清科技有限公司 | 小威小说网 - 新小威小说网 - 小威小说网小说搜索引擎 | 仓储笼_仓储货架_南京货架_仓储货架厂家_南京货架价格低-南京一品仓储设备制造公司 | 滚筒烘干机_转筒烘干机_滚筒干燥机_转筒干燥机_回转烘干机_回转干燥机-设备生产厂家 | 沧州友城管业有限公司-内外涂塑钢管-大口径螺旋钢管-涂塑螺旋管-保温钢管生产厂家 | 对辊破碎机_四辊破碎机_双齿辊破碎机_华盛铭重工 | 广州活动策划公司-15+年专业大型公关活动策划执行管理经验-睿阳广告 | 阿里巴巴诚信通温州、台州、宁波、嘉兴授权渠道商-浙江联欣科技提供阿里会员办理 |