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

  • <tfoot id='bBUx6'></tfoot>

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

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

      1. <legend id='bBUx6'><style id='bBUx6'><dir id='bBUx6'><q id='bBUx6'></q></dir></style></legend>
          <bdo id='bBUx6'></bdo><ul id='bBUx6'></ul>

        在 LESS 文件中出現(xiàn)錯誤后,Gulp.js 停止編譯 LESS

        Gulp.js stops compiling LESS when watched after there has been an error in the LESS files(在 LESS 文件中出現(xiàn)錯誤后,Gulp.js 停止編譯 LESS)

          <legend id='QNp5B'><style id='QNp5B'><dir id='QNp5B'><q id='QNp5B'></q></dir></style></legend>
            <tbody id='QNp5B'></tbody>
        1. <tfoot id='QNp5B'></tfoot>

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

          • <i id='QNp5B'><tr id='QNp5B'><dt id='QNp5B'><q id='QNp5B'><span id='QNp5B'><b id='QNp5B'><form id='QNp5B'><ins id='QNp5B'></ins><ul id='QNp5B'></ul><sub id='QNp5B'></sub></form><legend id='QNp5B'></legend><bdo id='QNp5B'><pre id='QNp5B'><center id='QNp5B'></center></pre></bdo></b><th id='QNp5B'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='QNp5B'><tfoot id='QNp5B'></tfoot><dl id='QNp5B'><fieldset id='QNp5B'></fieldset></dl></div>
            • <bdo id='QNp5B'></bdo><ul id='QNp5B'></ul>
                • 本文介紹了在 LESS 文件中出現(xiàn)錯誤后,Gulp.js 停止編譯 LESS的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我遇到了 gulp 的問題.我運行 gulp-watch 以及 gulp-lessgulp-clean.一切運行良好.

                  I'm having a problem with gulp. I run gulp-watch along with gulp-less and gulp-clean. Everything is running perfectly.

                  當我編輯 somefile.less 并保存它時缺少分號,或者我不小心留下了尾隨 ;s,我的代碼中出現(xiàn)錯誤時保存時,gulp-less 在控制臺中記錄一個錯誤.在我修復它之后 gulp-watch 繼續(xù)觀看文件,但 gulp-less 不會觸發(fā)并且它不會編譯.當我停止 gulp 并在終端中再次運行它時,一切恢復正常.

                  When I edit somefile.less and I save it with a semi-colon missing or maybe I accidentally leave a trailing ;s, just have errors in my code when saving, gulp-less logs an error in the console. After I fix it gulp-watch continues watching the files, but gulp-less doesn't fire and it doesn't compile. When I stop gulp and run it again in the terminal everything goes back to normal.

                  這是我的 gulpfile.js:

                  var gulp = require('gulp');
                  var clean = require('gulp-clean');
                  var gutil = require('gulp-util');
                  var less = require('gulp-less');
                  var watch = require('gulp-watch');
                  var path = require('path');
                  
                  gulp.task('clean', function() {
                      return gulp.src('src/main/webapp/styles/build', {read: false})
                     .pipe(clean().on('error', gutil.log))
                  });
                  
                  gulp.task('less', function() {
                      return gulp.src(['src/main/webapp/styles/main.less'], {base: 'src/main/webapp/styles/'})
                      .pipe(less().on('error', gutil.log))
                      .pipe(gulp.dest('src/main/webapp/styles/build'))
                      .on('error', gutil.log);
                  });
                  
                  gulp.task('watch', function() {
                      watch('src/main/webapp/styles/**/*.{less, css}', function() {
                          gulp.start('less')
                          .on('error', gutil.log);
                      })
                  });
                  
                  gulp.task('default', ['clean'], function() {
                      gulp.start(['less', 'watch'])
                      .on('error', gutil.log);
                  });
                  

                  這是我的 devDependencies:

                  "devDependencies": {
                      "gulp": "^3.8.10",
                      "gulp-clean": "^0.3.1",
                      "gulp-less": "^2.0.1",
                      "gulp-util": "^3.0.2",
                      "gulp-watch": "^3.0.0"
                  }
                  

                  最后,這是控制臺中的消息:

                  Finally, here is the message in the console:

                  [10:21:03] imports/productSearchPage.less was changed
                  [10:21:03] Starting 'less'...
                  [10:21:03] { [Error: Unrecognised input. Possibly missing something in file /src/main/webapp/styles/imports/productSearchPage.less line no. 1008]
                    type: 'Parse',
                    filename: '/src/main/webapp/styles/imports/productSearchPage.less',
                    index: 19127,
                    line: 1008,
                    callLine: NaN,
                    callExtract: undefined,
                    column: 0,
                    extract: [ '', '', undefined ],
                    message: 'Unrecognised input. Possibly missing something in file /src/main/webapp/styles/imports/productSearchPage.less line no. 1008',
                    stack: undefined,
                    lineNumber: 1008,
                    fileName: '/src/main/webapp/styles/imports/productSearchPage.less',
                    name: 'Error',
                    showStack: false,
                    showProperties: true,
                    plugin: 'gulp-less',
                    __safety: { toString: [Function] } }
                  [10:21:04] imports/productSearchPage.less was changed
                  [10:21:08] imports/productSearchPage.less was changed
                  ^C
                  

                  您能否告訴我 gulp-watch 任務有什么問題,并幫助我在刪除錯誤后使其運行 gulp-less,而無需重新啟動 <代碼>gulp.

                  Can you please tell me what is wrong with the gulp-watch task and help me make it run gulp-less after the errors have been removed, without restarting gulp.

                  我編輯的 gulp-less 任務

                  gulp.task('less', function() {
                      return gulp.src(['src/main/webapp/styles/main.less'], {base: 'src/main/webapp/styles/'})
                      .pipe(less().on('error', gutil.log))
                      .pipe(gulp.dest('src/main/webapp/styles/build'))
                      .on('error', function(err) {
                          gutil.log(err);
                          this.emit('end');
                      });
                  });
                  

                  推薦答案

                  現(xiàn)在可以了!這是我最后的工作,gulp-less 任務:

                  It works now! Here is my final, and working, gulp-less task:

                  gulp.task('less', function() {
                      return gulp.src(['src/main/webapp/styles/main.less'], {base: 'src/main/webapp/styles/'})
                      .pipe(less().on('error', function(err){
                          gutil.log(err);
                          this.emit('end');
                      }))
                      .pipe(gulp.dest('src/main/webapp/styles/build'))
                  });
                  

                  問題是,當 LESS 中出現(xiàn)錯誤時,任務仍然繼續(xù)并構(gòu)建目標文件.最重要的是,我放置了錯誤記錄函數(shù)和 emit('end') 作為對 gulp.dest 的回調(diào).

                  The problem was that, when there was an error in the LESS the task still went on and built the destination file. On top of that I placed the error logging function and the emit('end') as a callback to gulp.dest.

                  現(xiàn)在,當 less() 的回調(diào)是錯誤日志并且 emit('end') 一切正常.

                  Now, when the callback of less() is the error log and emit('end') everything works perfectly.

                  這篇關(guān)于在 LESS 文件中出現(xiàn)錯誤后,Gulp.js 停止編譯 LESS的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  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='PTeVM'></tfoot>
                      • <bdo id='PTeVM'></bdo><ul id='PTeVM'></ul>

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

                          <legend id='PTeVM'><style id='PTeVM'><dir id='PTeVM'><q id='PTeVM'></q></dir></style></legend>
                              <tbody id='PTeVM'></tbody>
                            主站蜘蛛池模板: 精品一区二区三区四区在线 | 欧洲亚洲视频 | 中文字幕一区二区三区四区五区 | 新91视频网 | 欧美日韩精品影院 | 美女视频黄色的 | 男女羞羞视频免费 | 日韩免费毛片视频 | 综合第一页 | 一级片网址 | 一区二区av在线 | 色婷婷九月 | 国产99视频精品免费播放照片 | 亚洲精品免费在线观看 | 亚洲欧美视频 | 国产精品入口麻豆www | 成人av播放 | 久久精品网 | 中文字幕一级毛片视频 | 黄网站涩免费蜜桃网站 | 看片91 | 91资源在线| 日韩三级在线 | 成人av一区二区亚洲精 | 999久久| 在线免费观看黄a | 91视视频在线观看入口直接观看 | 91在线网站 | 毛色毛片免费看 | 九九九色 | 在线观看亚洲专区 | 欧美成人aaa级毛片在线视频 | 日韩精品视频在线观看一区二区三区 | 99这里只有精品视频 | 99久久免费精品国产免费高清 | 欧美精品国产一区二区 | 国产精品日韩在线观看一区二区 | www.一级片 | 国产一区二区三区网站 | 青青久久av北条麻妃海外网 | 国产一区二区在线免费视频 |