Skip to content

Commit 97d31e3

Browse files
committed
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.
1 parent 75996b5 commit 97d31e3

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

tools/gulp/tasks/library.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ const bundlesDir = DIST_BUNDLES;
2121

2222
const esmMainFile = join(materialDir, 'index.js');
2323

24+
task('library', sequenceTask('clean', 'library:build'));
25+
2426
task('library:build', sequenceTask(
25-
'clean',
2627
['library:build:esm', 'library:assets'],
2728
// Inline assets into ESM output.
2829
'library:assets:inline',

tools/gulp/tasks/lint.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {DIST_MATERIAL} from '../constants';
55
gulp.task('lint', ['tslint', 'stylelint', 'madge']);
66

77
/** Task that runs madge to detect circular dependencies. */
8-
gulp.task('madge', ['library:build'], execNodeTask('madge', ['--circular', DIST_MATERIAL]));
8+
gulp.task('madge', ['library'], execNodeTask('madge', ['--circular', DIST_MATERIAL]));
99

1010
/** Task to lint Angular Material's scss stylesheets. */
1111
gulp.task('stylelint', execNodeTask(

tools/gulp/tasks/payload.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {openFirebaseDashboardDatabase} from '../util/firebase';
99
const bundlesDir = join(DIST_ROOT, 'bundles');
1010

1111
/** Task which runs test against the size of whole library. */
12-
task('payload', ['library:build'], () => {
12+
task('payload', ['library'], () => {
1313

1414
let results = {
1515
umd_kb: getBundleSize('material.umd.js'),

tools/gulp/tasks/release.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const themingBundlePath = join(DIST_RELEASE, '_theming.scss');
3434
const prebuiltThemeGlob = join(DIST_MATERIAL, '**/theming/prebuilt/*.css');
3535

3636
task('build:release', sequenceTask(
37-
'library:build',
37+
'library',
3838
':package:release',
3939
));
4040

0 commit comments

Comments
 (0)