build: enable bundle_dts for core package (#28884)

`ng_module` will now include an `src/r3_symbol.d.ts` when compiling the core package under `ngc` togather with `dts bundling`, This is due that `ngcc` relies on this file to be present, but the `r3_symbols` file which is not part of our public api.

With this change, we can now ship an addition dts file which is flattened.

PR Close #28884
This commit is contained in:
Alan
2019-03-06 09:04:18 +01:00
committed by Kara Erickson
parent a746b5b1ea
commit 7b0e9eddd1
7 changed files with 83 additions and 54 deletions

View File

@ -114,5 +114,19 @@ api-extractor: running with
}
const [tsConfig, entryPoint, dtsBundleOut] = process.argv.slice(2);
process.exitCode = runMain(tsConfig, entryPoint, dtsBundleOut);
const entryPoints = entryPoint.split(',');
const dtsBundleOuts = dtsBundleOut.split(',');
if (entryPoints.length !== entryPoints.length) {
throw new Error(
`Entry points count (${entryPoints.length}) does not match Bundle out count (${dtsBundleOuts.length})`);
}
for (let i = 0; i < entryPoints.length; i++) {
process.exitCode = runMain(tsConfig, entryPoints[i], dtsBundleOuts[i]);
if (process.exitCode !== 0) {
break;
}
}
}