My GULP:
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
imagemin = require('gulp-imagemin'),
changed = require('gulp-changed'),
browserSync = require('browser-sync'),
livereload = require('gulp-livereload');
gulp.task('sass', function () {
gulp.src('./assets/sass/*.scss')
.pipe(sass({compass: false}))
.on('error', function (err) { console.log(err.message); })
.pipe(gulp.dest('./dist/css'))
.pipe(livereload());
});
gulp.task('jpg', function() {
gulp.src('./assets/img/**/*.jpg')
.pipe(changed('./dist/img/'))
.pipe(imagemin({
progressive: true
}))
.pipe(gulp.dest('./dist/img/'));
});
gulp.task('browser-sync', function() {
browserSync.init(['./dist/css/**', './views/**'], {
server: {
baseDir: './',
index: './views/index.html'
}
});
});
gulp.task('watch', ['sass', 'browser-sync'], function () {
livereload.listen();
gulp.watch('./assets/sass/**/*.scss', ['sass']);
});
When I run, everything works, but SASS does not detect changes. Index.html works.
What could be wrong?