2016-01-05 38 views
1

我已經安裝了nodejs和gulp來自動編譯引導少文件(v 3.3.5)和gulp-watch-less模塊。自動編譯引導少文件的吞嚥/ gulp-watch-less不會重新生成css

一切工作正常期待一件事:我必須停止並開始吞嚥重新生成bootstrap.css

有關信息,咕嘟咕嘟被檢測到包括在一個bootstrap.less .LESS文件被修改,我有以下信息:

[23:14:40] Starting 'default'... 
[23:14:42] Finished 'default' after 2.04 s 
[23:16:42] LESS saw variable-overrides.less was changed 
[23:16:42] LESS saw variable-overrides.less was changed 
[23:16:42] LESS saw bootstrap.less was changed:by:import 
[23:16:42] LESS saw bootstrap.less was changed:by:import 

但是,當我打開bootstrap.css文件我不看到變化,直到我停下來再次開始吞嚥。

這是我gulpfile.js的內容:

var gulp = require('gulp'); 
var watchLess = require('gulp-watch-less'); 
var less = require('gulp-less'); 

gulp.task('default', function() { 
    return gulp.src('./../../../../drupal8/sandbox/felicity/themes/octogone/less/bootstrap.less') 
     .pipe(watchLess('./../../../../drupal8/sandbox/felicity/themes/octogone/less/bootstrap.less')) 
     .pipe(less()) 
     .pipe(gulp.dest('./../../../../drupal8/sandbox/felicity/themes/octogone/css')); 
}); 

此代碼是從gulp-watch-less page

有人能解釋我爲什麼bootstrap.css不自動重新產生的?

回答