Currently i have folder stucture like below.
- css
- scss
- _icon.scss
- _admin.scss
- main.scss
- personal.scss
- scss
- modules
- directives
- map
- map.html
- map.scss
- map.js
- map
- directives
I have gulp sass with following
gulp.task("sass", function() {
return gulp.src('css/main.scss') // location of main scss file name
.pipe(sourcemaps.init()) //TODO: important, comment out this line in staging and production
//.pipe(rename({suffix: '.min'})) // include this to rename the file to fileName.min.css
//.pipe(minifycss()) // include this to minify the file
.pipe(sass.sync().on('error', sass.logError))
.pipe(sourcemaps.write()) //TODO: important, comment out this line in staging and production
.pipe(concat("main.min.css"))
.pipe(gulp.dest('./css'));
});
I want to watch all files with extension .scss
in my root directory when there are any changes.