bd7f440357
This dependency host tokenizes files to identify all the imported paths. This commit calculates the last place in the source code where there can be an import path; it then exits the tokenization when we get to this point in the file. Testing with a reasonably large project showed that the tokenizer spends about 2/3 as much time scanning files. For example in a "noop" hot run of ngcc using the program-based entry-point finder the percentage of time spent in the `scan()` function of the TS tokenizer goes down from 9.9% to 6.6%. PR Close #37639 |
||
---|---|---|
.. | ||
src | ||
test | ||
BUILD.bazel | ||
README.md | ||
index.ts | ||
main-ivy-ngcc.ts | ||
main-ngcc.ts |
README.md
Angular Compatibility Compiler (ngcc)
This compiler will convert node_modules
compiled with ngc
, into node_modules
which
appear to have been compiled with ngtsc
.
This conversion will allow such "legacy" packages to be used by the Ivy rendering engine.
Building
The project is built using Bazel:
yarn bazel build //packages/compiler-cli/ngcc
Unit Testing
The unit tests are built and run using Bazel:
yarn bazel test //packages/compiler-cli/ngcc/test
Integration Testing
There are tests that check the behavior of the overall executable:
yarn bazel test //packages/compiler-cli/ngcc/test:integration