I have seen many stackoverflow solutions, but none of them work in my script.
My gulp watch looks at the file, but the output file is not updated.
The launch gulpworks fine, since by default it is configured to invoke the sass task, and the task successfully compiles my css output.
Here is my directory structure:
- css
- sass
* style.scss
* style.css
* gulpfile.js
and my gulpfile:
var gulp = require('gulp');
var rename = require('gulp-rename');
var sass = require('gulp-sass');
var cssbeautify = require('gulp-cssbeautify');
var cssmin = require('gulp-cssmin');
gulp.task('sass', function () {
return gulp.src('./css/sass/*.scss')
.pipe(sass())
.pipe(cssbeautify())
.pipe(gulp.dest('css'));
});
gulp.task('watch', function () {
gulp.watch('./css/sass/*.scss', ['sass']);
});
gulp.task('default', ['sass']);
The gulp clock gives me: (11:01 is when I saved the file)
[10:59:48] Using gulpfile ~ / Sites / cla / 8_0 / web / intranet / reports / gulpfile.js
[10:59:48] Start watching ... [10:59:48] Finished watching "after 12 ms
[11:01:25] Starting 'sass' ...
[11:01:25] Finished" sass "after 24 ms
, css ?
!