diff --git a/tools/gulp/tasks/library.ts b/tools/gulp/tasks/library.ts index 2de4da5c29d4..390990706905 100644 --- a/tools/gulp/tasks/library.ts +++ b/tools/gulp/tasks/library.ts @@ -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', diff --git a/tools/gulp/tasks/lint.ts b/tools/gulp/tasks/lint.ts index 3bec3c40aa55..e2a705d5eb6e 100644 --- a/tools/gulp/tasks/lint.ts +++ b/tools/gulp/tasks/lint.ts @@ -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( diff --git a/tools/gulp/tasks/payload.ts b/tools/gulp/tasks/payload.ts index 4d10d4c373cd..a7657aaa9dd3 100644 --- a/tools/gulp/tasks/payload.ts +++ b/tools/gulp/tasks/payload.ts @@ -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'), diff --git a/tools/gulp/tasks/release.ts b/tools/gulp/tasks/release.ts index 8ae3c4d2b2a0..72412ae8bedb 100644 --- a/tools/gulp/tasks/release.ts +++ b/tools/gulp/tasks/release.ts @@ -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', ));