5 Commits

Author SHA1 Message Date
Charles Lyding
c4313f55e4 refactor(@angular/cli): unify color handling and support 2019-06-24 17:27:59 -07:00
Charles Lyding
7a72f2fb17 refactor(@angular/cli): avoid aggressive eager command loading
Currently, upon execution `ng` will load all description files AND code for all available commands.  This requires a large amount of unnecessary file access and processing since only at most one command will be executed.  This change limits the loading to only command being executed in the common case and a subset of commands in the event an alias is used.  The help command now loads all commands during its execution which is needed to gather command description information.  Further improvements are possible by only loading the necessary metadata instead of the execution code (and its dependencies) as well.
This change allows for savings of ~250ms per execution.

Examples:
Before -- `./node_modules/.bin/ng version  0.99s user 0.17s system 113% cpu 1.020 total`
After -- `./node_modules/.bin/ng version  0.70s user 0.13s system 110% cpu 0.749 total`

Before -- `./node_modules/.bin/ng g c a  1.91s user 0.30s system 111% cpu 1.996 total`
After -- `./node_modules/.bin/ng g c a  1.62s user 0.27s system 110% cpu 1.715 total`
2019-05-10 15:04:32 -07:00
Hans Larsen
30b0cbda0d refactor(@angular/cli): automated JSON schema interface generation 2018-09-13 16:44:17 -07:00
Hans
de7ec84872 feat(@angular/cli): add --helpJson (or --help-json) too all commands
And other refactors.

The interface for the JSON is available in command.ts (the CommandDescription).
2018-09-06 07:37:48 -07:00
Hans
c75318b432 fix(@angular/cli): fix ci for new command formats 2018-08-13 20:58:47 -07:00