build: test cdk in aot and closure (#4142)

This commit is contained in:
Paul Gschwendtner
2017-04-19 00:57:44 +02:00
committed by Kara
parent efd348512f
commit fe7570a1da
13 changed files with 36 additions and 28 deletions
+8 -3
View File
@@ -7,12 +7,17 @@ import {join} from 'path';
const tsconfigFile = join(DIST_DEMOAPP, 'tsconfig-aot.json');
/** Builds the demo-app and library. To be able to run NGC, apply the metadata workaround. */
task('aot:deps', sequenceTask('build:devapp', ':package:release', 'aot:copy-release'));
task('aot:deps', sequenceTask(
'build:devapp',
[':package:release', 'cdk:build-release'],
'aot:copy-release'
));
// As a workaround for https://github.com/angular/angular/issues/12249, we need to
// copy the Material ESM output inside of the demo-app output.
// copy the Material and CDK ESM output inside of the demo-app output.
task('aot:copy-release', () => {
return copySync(join(DIST_RELEASES, 'material'), join(DIST_DEMOAPP, 'material'));
copySync(join(DIST_RELEASES, 'material'), join(DIST_DEMOAPP, 'material'));
copySync(join(DIST_RELEASES, 'cdk'), join(DIST_DEMOAPP, 'cdk'));
});
/** Build the demo-app and a release to confirm that the library is AOT-compatible. */
+2 -1
View File
@@ -26,7 +26,8 @@ task('cdk:build', sequenceTask(
'cdk:build:bundles',
));
task('cdk:build-release', ['cdk:clean-build'], () => composeRelease('cdk'));
task('cdk:build-release', ['cdk:build'], () => composeRelease('cdk'));
task('cdk:build-release:clean', sequenceTask('clean', 'cdk:build-release'));
/** [Watch task] Rebuilds the CDK whenever TS, SCSS, or HTML files change. */
task('cdk:watch', () => {
+2 -1
View File
@@ -28,7 +28,8 @@ task('examples:build', sequenceTask(
'examples:build:bundles',
));
task('examples:release', ['examples:clean-build'], () => composeRelease('material-examples'));
task('examples:build-release', ['examples:build'], () => composeRelease('material-examples'));
task('examples:build-release:clean', sequenceTask('clean', 'examples:build-release'));
/**
* TypeScript compilation tasks. Tasks are creating ESM, FESM, UMD bundles for releases.
+3 -3
View File
@@ -14,9 +14,9 @@ const ROLLUP_GLOBALS = {
'@angular/platform-browser-dynamic': 'ng.platformBrowserDynamic',
'@angular/platform-browser/animations': 'ng.platformBrowser.animations',
// NGC always adds the `index` suffix. As a temporary workaround just define that as a global.
'@angular/material/index': 'ng.material',
'@angular/cdk/index': 'ng.cdk',
// Local Angular packages inside of Material.
'@angular/material': 'ng.material',
'@angular/cdk': 'ng.cdk',
// Rxjs dependencies
'rxjs/Subject': 'Rx',