From 5f1f072d7e92515820ba94f5d65b6ce8ed08af96 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Mon, 24 Sep 2018 22:33:57 +0200 Subject: [PATCH] build: livereload not working for core/theming files (#13275) Since most of the SCSS files inside of `core/theming` are not suffixed with `-theme.scss`, the livereload will rebuild the Material bundles, but not the theme SCSS files. This causes undesired slow-down and a non-working livereload. --- tools/gulp/tasks/development.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/gulp/tasks/development.ts b/tools/gulp/tasks/development.ts index a4d23a002f2..883e8a7f8e2 100644 --- a/tools/gulp/tasks/development.ts +++ b/tools/gulp/tasks/development.ts @@ -133,9 +133,15 @@ task(':watch:devapp', () => { // CDK package watchers. watchFiles(join(cdkPackage.sourceDir, '**/*'), ['cdk:build-no-bundles']); + const materialCoreThemingGlob = join(materialPackage.sourceDir, '**/core/theming/**/*.scss'); + // Material package watchers. - watchFiles(join(materialPackage.sourceDir, '**/!(*-theme.scss)'), ['material:build-no-bundles']); - watchFiles(join(materialPackage.sourceDir, '**/*-theme.scss'), [':build:devapp:scss']); + watchFiles([ + join(materialPackage.sourceDir, '**/!(*-theme.scss)'), `!${materialCoreThemingGlob}` + ], ['material:build-no-bundles']); + watchFiles([ + join(materialPackage.sourceDir, '**/*-theme.scss'), materialCoreThemingGlob + ], [':build:devapp:scss']); // Moment adapter package watchers watchFiles(join(momentAdapterPackage.sourceDir, '**/*'),