I have previously used gulp changed with my JS without a problem. However now I am trying to use gulp-changed
and gulp-newer
on my scss
files without it detecting which file has changed.
var changed = require('gulp-changed');
var newer = require('gulp-newer');
var SRC = './stylesheets/**/*.scss';
var DEST = './stylesheets';
gulp.task('sass', function () {
return gulp.src(SRC)
.pipe(changed(DEST)) //tried newer here as well
.pipe(sass())
.pipe(gulp.dest(DEST))
});
When changing a scss file it will output there has been a change but not change any scss
[BS] Watching files...
[09:26:13] Starting 'sass'...
[09:26:14] Finished 'sass' after 180 ms
Watch
gulp.task('watch', ['setWatch', 'browserSync'], function () {
gulp.watch('./stylesheets/**/*.scss', ['sass']);
});
The output file expected exists and hasn't been changed since yesterday.
How can I get the scss to only compile changed files.