我正在尝试使用gulp-changed来防止在未更改的文件上发生耗时的任务。我的 gulpfile.js 设置如下:
gulp.task("min:css", function () {
return gulp.src([paths.css, "!" + paths.minCss])
.pipe(changed("."))
.pipe(concat(paths.concatCssDest))
.pipe(autoprefixer({ browsers: ['> 5%'] })) //support browsers with >5% market share
.pipe(cssmin())
.pipe(gulp.dest("."));
});
但是,每次我看到一切都在运行时:
[11:15:02] Starting 'min:js'...
[11:15:02] Starting 'min:css'...
[11:15:02] Finished 'min:css' after 79 ms
Process terminated with code 0.
[11:15:02] Finished 'min:js' after 121 ms
[11:15:02] Starting 'min'...
[11:15:02] Finished 'min' after 12 μs
任何原因gulp-changed没有过滤这些未更改的文件?