angular-cn/packages/compiler-cli/ngcc/test/execution
Pete Bacon Darwin 8d13f631d9 refactor(ngcc): support processing only the typings files of packages (#40976)
Some tools (such as Language Server and ng-packagr) only care about
the processed typings generated by ngcc. Forcing these tools to process
the JavaScript files as well has two disadvantages:

First, unnecessary work is being done, which is time consuming.

But more importantly, it is not always possible to know how the final bundling
tools will want the processed JavaScript to be configured. For example,
the CLI would prefer the `--create-ivy-entry-points` option but this would
break non-CLI build tooling.

This commit adds a new option (`--typings-only` on the command line, and
`typingsOnly` via programmatic API) that instructs ngcc to only render changes
to the typings files for the entry-points that it finds, and not to write any
JavaScript files.

In order to process the typings, a JavaScript format will need to be analysed, but
it will not be rendered to disk. When using this option, it is best to offer ngcc a
wide range of possible JavaScript formats to choose from, and it will use the
first format that it finds. Ideally you would configure it to try the `ES2015` FESM
format first, since this will be the most performant.

Fixes #40969

PR Close #40976
2021-02-24 14:23:14 -08:00
..
cluster refactor(ngcc): support processing only the typings files of packages (#40976) 2021-02-24 14:23:14 -08:00
tasks/queues refactor(ngcc): support processing only the typings files of packages (#40976) 2021-02-24 14:23:14 -08:00
helpers.ts refactor(ngcc): support processing only the typings files of packages (#40976) 2021-02-24 14:23:14 -08:00
single_processor_executor_spec.ts refactor(ngcc): move `logging` code into `ngtsc` (#37114) 2020-06-22 13:38:47 -07:00
utils_spec.ts refactor(ngcc): support processing only the typings files of packages (#40976) 2021-02-24 14:23:14 -08:00