Skip to content

Commit

Permalink
build: fix serve task
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
devversion committed Mar 26, 2017
1 parent 75996b5 commit 2b0126d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion tools/gulp/tasks/library.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ const bundlesDir = DIST_BUNDLES;

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

task('library', sequenceTask('clean', 'library:build'));

task('library:build', sequenceTask(
'clean',
['library:build:esm', 'library:assets'],
// Inline assets into ESM output.
'library:assets:inline',
Expand Down
2 changes: 1 addition & 1 deletion tools/gulp/tasks/lint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'], execNodeTask('madge', ['--circular', DIST_MATERIAL]));

/** Task to lint Angular Material's scss stylesheets. */
gulp.task('stylelint', execNodeTask(
Expand Down
2 changes: 1 addition & 1 deletion tools/gulp/tasks/payload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'], () => {

let results = {
umd_kb: getBundleSize('material.umd.js'),
Expand Down
1 change: 1 addition & 0 deletions tools/gulp/tasks/release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const themingBundlePath = join(DIST_RELEASE, '_theming.scss');
const prebuiltThemeGlob = join(DIST_MATERIAL, '**/theming/prebuilt/*.css');

task('build:release', sequenceTask(
'clean',
'library:build',
':package:release',
));
Expand Down

0 comments on commit 2b0126d

Please sign in to comment.