Commit 4902da4db0e3b5fc5bfb9a5c492017b26f37fd21

Authored by Victor Costa
1 parent 628d8b3b

Fix style paths in gulp watch

Showing 1 changed file with 7 additions and 5 deletions   Show diff stats
gulp/watch.js
... ... @@ -15,11 +15,13 @@ gulp.task('watch', ['inject'], function () {
15 15  
16 16 gulp.watch([path.join(conf.paths.src, '/*.html'), 'bower.json'], ['inject-reload']);
17 17  
18   - gulp.watch([
19   - path.join(conf.paths.src, '/app/**/*.css'),
20   - path.join(conf.paths.src, '/app/**/*.scss'),
21   - path.join(conf.paths.src, conf.paths.plugins, '/**/*.scss')
22   - ], function(event) {
  18 + var stylePaths = [path.join(conf.paths.src, conf.paths.plugins, '/**/*.scss')];
  19 + conf.paths.allSources.forEach(function(src) {
  20 + stylePaths.push(path.join(src, '/app/**/*.css'));
  21 + stylePaths.push(path.join(src, '/app/**/*.scss'));
  22 + });
  23 +
  24 + gulp.watch(stylePaths, function(event) {
23 25 if(isOnlyChange(event)) {
24 26 gulp.start('styles-reload');
25 27 } else {
... ...