I want to compile only the .less
files that have changed in order to speed up my debug/coding workflow.
Here is my gulp task:
gulp.src('core/**/*.less')
.pipe(changed('core'))
.pipe(less().on('error', handleError))
.pipe(autoprefixer('last 2 version'))
.pipe(remember())
.pipe(concat('main.min.css'))
.pipe(gulp.dest('core'))
.on('end', resolve)
.on('error', reject);
I used gulp-changed
and because it didn't work at first, I tried to use gulp-remember
as well, but with no effect. The watch works, it compiles super fast, but it has no effect at all.
If I remove changed('core')
and remember()
it works, but it's slower (around 16 seconds).