Skip to content

Commit a431037

Browse files
committed
chore(build): sequential build steps
1 parent 0d27787 commit a431037

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

src/core/tsconfig-build.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
],
2626
"angularCompilerOptions": {
2727
"skipTemplateCodegen": true,
28-
"strictMetadataEmit": true
28+
"strictMetadataEmit": true,
29+
"enableSummariesForJit": false
2930
}
3031
}

tools/build.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,12 @@ const TSC_ARGS = (name, config = 'build') => [`-p`, `${process.cwd()}/src/${name
6262

6363
function buildModule(name) {
6464
// Run tsc on module (TS -> ES2015)
65-
return spawnObservable(TSC, TSC_ARGS(name))
66-
// Copy package.json to dist/pacakges/modulename/package.json
67-
// Run tsc but for ES5 target and ES2015 imports, exports to dist/packages-dist
68-
// (this is for rollup)
69-
.concatMap(() => spawnObservable(TSC, TSC_ARGS(name, 'esm')))
70-
.concatMap(() => Observable.from(copyPackage(name)))
71-
.debounceTime(2000)
72-
// Use rollup to build UMD bundle to dist/bundles`
73-
.concatMap(() => Observable.from(createUmd(name)));
65+
const es2015$ = spawnObservable(TSC, TSC_ARGS(name));
66+
const esm$ = spawnObservable(TSC, TSC_ARGS(name, 'esm'));
67+
return Observable
68+
.forkJoin(es2015$, esm$)
69+
.mergeMap(() => Observable.from(createUmd(name)))
70+
.mergeMap(() => Observable.from(copyPackage(name)));
7471
}
7572

7673
buildModule('core').subscribe(

0 commit comments

Comments
 (0)