mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
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:
committed by
tinayuangao
parent
becb7a87e0
commit
07bc4add13
@@ -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',
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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'),
|
||||
|
||||
@@ -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',
|
||||
));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user