build: fix serve task (#3794)

* build: fix serve task

* Currently when serving the dev-app or e2e-app and chanages are recognized, the library task will run. This task clears the whole `dist/` and rebuilds then.

* This is problematic because sometimes only the library will be rebuilt and for example the `dev-app` won't be rebuilt. After the task ran, the `dev-app` is removed and the serve task will crash.

* Rename to library:clean-build
This commit is contained in:
Paul Gschwendtner
2017-03-29 20:13:45 +02:00
committed by tinayuangao
parent becb7a87e0
commit 07bc4add13
4 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -21,8 +21,9 @@ const bundlesDir = DIST_BUNDLES;
const esmMainFile = join(materialDir, 'index.js');
task('library:clean-build', sequenceTask('clean', 'library:build'));
task('library:build', sequenceTask(
'clean',
['library:build:esm', 'library:assets'],
// Inline assets into ESM output.
'library:assets:inline',
+1 -1
View File
@@ -5,7 +5,7 @@ import {DIST_MATERIAL} from '../constants';
gulp.task('lint', ['tslint', 'stylelint', 'madge']);
/** Task that runs madge to detect circular dependencies. */
gulp.task('madge', ['library:build'], execNodeTask('madge', ['--circular', DIST_MATERIAL]));
gulp.task('madge', ['library:clean-build'], execNodeTask('madge', ['--circular', DIST_MATERIAL]));
/** Task to lint Angular Material's scss stylesheets. */
gulp.task('stylelint', execNodeTask(
+1 -1
View File
@@ -9,7 +9,7 @@ import {openFirebaseDashboardDatabase} from '../util/firebase';
const bundlesDir = join(DIST_ROOT, 'bundles');
/** Task which runs test against the size of whole library. */
task('payload', ['library:build'], () => {
task('payload', ['library:clean-build'], () => {
let results = {
umd_kb: getBundleSize('material.umd.js'),
+1 -1
View File
@@ -34,7 +34,7 @@ const themingBundlePath = join(DIST_RELEASE, '_theming.scss');
const prebuiltThemeGlob = join(DIST_MATERIAL, '**/theming/prebuilt/*.css');
task('build:release', sequenceTask(
'library:build',
'library:clean-build',
':package:release',
));