V
V
Valery Stolyarchuk2016-12-04 17:48:39
css
Valery Stolyarchuk, 2016-12-04 17:48:39

How to set up compiling Sass to Gulp from all folders?

Hello! Tell me how to set up compilation of Sass files in internal folders?
Folder structure:

sass
- components
-- _components.sass
-- blog
- pages
main.sass

GULP task:
gulp.task('styles', function () {
  return gulp.src('sass/**/*.sass')
  .pipe(sass({
    includePaths: require('node-bourbon').includePaths
  }).on('error', sass.logError))
  // .pipe(rename({suffix: '.min', prefix : ''}))
  .pipe(autoprefixer({browsers: ['last 15 versions'], cascade: false}))
  // .pipe(minifycss())
  .pipe(gulp.dest('app/css'))
  .pipe(browserSync.stream());
});

The problem is that after saving the files in the folder
components
, the Sass file does not compile, please tell me how to track changes in the internal folders for sass ?
Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
be_a_man, 2016-12-04
@Xvento

gulp watch

W
WQP, 2016-12-04
@WQP

sass/**/**/*.sass

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question