* Compiles the project using the Angular compiler in order to produce JS output of * the packages and tests. This step is important in order to full-compile all * exported components of the library (inlining external stylesheets or templates).
()
| 111 | * exported components of the library (inlining external stylesheets or templates). |
| 112 | */ |
| 113 | async function compileProjectWithNgtsc() { |
| 114 | // Build the project with Ngtsc so that external resources are inlined. |
| 115 | const ngcProcess = child_process.spawnSync( |
| 116 | 'node', |
| 117 | [ngcBinFile, '--project', legacyTsconfigPath], |
| 118 | {shell: true, stdio: 'inherit'}, |
| 119 | ); |
| 120 | |
| 121 | if (ngcProcess.error || ngcProcess.status !== 0) { |
| 122 | throw Error('Unable to compile tests and library. See error above.'); |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | /** |
| 127 | * Queries for all spec files in the built output and creates a single |