I have a style.css and a folder called sass which contains a style.scss I followed the steps of gulp for beginners but for some reason whatever I type into the .scss file does not compile into the .css file.
Here is what I have in my gulpfile.js
gulp.task(‘sass’, function() {
gulp.src(‘./sass/style.scss’)
.pipe(plumber(plumberErrorHandler))
.pipe(sass())
.pipe(autoprefixer({
browsers: [‘last 2 versions’]
}))
.pipe(gulp.dest(‘./’))
.pipe(cssnano())
.pipe(rename(‘style.min.css’))
.pipe(gulp.dest(‘./build/css’));
});
gulp.task(‘browserSync’, function() {
var files = [
‘./build/css/.css’,
‘./build/js/.js’,
‘./*.php’,
‘./**/*.php’,
];
gulp.task(‘watch’, [‘browserSync’, ‘sass’, ‘scripts’], function (){
gulp.watch(‘./sass/.scss’, [‘sass’]);
gulp.watch(‘./js/.js’, [‘scripts’]);
});
The js is minifying into a build folder. But I can’t figure out why the css isn’t as well.