I trying to compile my SASS to CSS but my gulp watch only on first task - where is bad?
gulpfile.js
var gulp = require('gulp');
var sass = require('gulp-sass');
gulp.task('styles', function() {
gulp.src('sass/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('./css/'));
});
gulp.task('bootstrap', function() {
gulp.src('sass/bootstrap/bootstrap.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('./plugins/bootstrap/css/'));
});
gulp.task('default',function() {
gulp.watch('sass/*.scss',['styles']);
gulp.watch('sass/bootstrap/*.scss',['bootstrap']);
});
Structure of my files:
assets
-- css/
---- style.css
-- node_modules/
---- (files from node)
-- sass/
---- bootstrap/
------- (parts of bootstrap)
---- bootstrap.scss
---- style.scss
-- gulpfile.js
-- package.json
I want compile:
assets/sass/style.scss -> assets/css/style.css
assets/sass/bootstrap.scss -> assets/plugins/bootstrap/css/bootstrap.min.css