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

  • <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="qwawimqqmiuu" 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="qwawimqqmiuu" 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="qwawimqqmiuu" 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>
                            主站蜘蛛池模板: 国产目拍亚洲精品99久久精品 | www国产成人免费观看视频,深夜成人网 | 男人亚洲天堂 | 日韩欧美国产一区二区 | wwwww在线观看 | 精品国产一区二区三区久久久四川 | 国产精品视频一区二区三区四区国 | 99久久精品免费看国产免费软件 | 免费av手机在线观看 | 久久国产成人精品国产成人亚洲 | 国产精品视频中文字幕 | 亚洲成人精品国产 | 日韩av一区在线观看 | 久久av资源网 | 理伦毛片| 日本视频一区二区三区 | 老司机精品福利视频 | 欧美视频在线看 | 亚洲狠狠 | www久久 | 麻豆av电影网| 日日夜夜免费精品视频 | 亚洲一二三在线 | 成人精品视频在线观看 | 中文字幕在线看 | 国产成人精品久久二区二区 | 国产超碰人人爽人人做人人爱 | 国产欧美日韩视频 | 2019天天操 | 国产综合在线视频 | 一区二区三区在线观看视频 | 7799精品视频天天看 | 91一区二区三区在线观看 | 日韩中文在线视频 | 久久久这里都是精品 | 懂色中文一区二区三区在线视频 | www.日韩系列 | 91久久| 亚洲bt 欧美bt 日本bt | 亚洲电影一区二区三区 | 国产精品国产精品国产专区不卡 |