22 Commits

Author SHA1 Message Date
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
6e5095b134 feat(@angular/cli): allows analytics sharing with a third party
Documentation can be seen at https://next.angular.io/cli/usage-analytics-gathering
2019-03-26 10:07:30 -07:00
Hans Larsen
cf5cf19bb5 feat(@angular/cli): add analytic support to commands and command-runner
This is only reporting commands and their flags right now, and not
schematics or project analytics.
2019-03-20 15:08:07 -07:00
Hans Larsen
456614828f feat(@angular/cli): allow flags to have deprecation
The feature comes from the "x-deprecated" field in schemas (any schema that is used
to parse arguments), and can be a boolean or a string.

The parser now takes a logger and will warn users when encountering a deprecated
option. These options will also appear in JSON help.
2018-11-14 10:29:07 -08:00
Filipe Silva
eef66f0f65 fix(@angular/cli): error out when command json is invalid 2018-11-01 08:26:28 -07:00
Charles Lyding
5af69ba43b refactor(@angular/cli): remove rxjs direct dependency 2018-10-31 14:53:56 -07:00
Hans
97576ecd13 fix(@angular/cli): do not show stack on argument parse error 2018-09-19 13:02:40 -07:00
Hans
b02a7e5f9b fix(@angular/cli): on error finding files, show warning
This should not prevent execution, but is useful to know.
2018-09-19 13:02:40 -07:00
Charles Lyding
c12d3ee329 refactor(@angular/cli): correct implicit returns 2018-09-19 11:32:39 -07:00
Charles Lyding
6cfb72acc2 fix(@angular/cli): support --version option 2018-09-19 09:31:13 -07:00
Hans Larsen
fefef0271e refactor(@angular/cli): remove parseJsonFile and add options to parseJson instead 2018-09-06 07:37:48 -07:00
Hans
7ffd3b3033 refactor(@angular/cli): rename project to workspace and clean up
Removed unnecessary fields in interfaces, added some comments. Overall QoL.
2018-09-06 07:37:48 -07:00
Hans
ff1baab7fc feat(@angular/cli): remove yargs-parser and implement parsing
This is fully backward compatible.
2018-09-06 07:37:48 -07:00
Alan Agius
b759ebdc55 fix(@angular/cli): command runner is not working on windows
`fs` is unable to read the normalized paths from `@angular-devkit/core`  on `windows` as the disk drive is replaced from `c:/` to `/c/`

Closes #11928
2018-08-17 11:38:42 -07:00
Hans
2ce1155158 fix(@angular/cli): allow commandMap as an argument
With a fallback to looking for it from current file.
2018-08-13 20:58:47 -07:00
Hans
c75318b432 fix(@angular/cli): fix ci for new command formats 2018-08-13 20:58:47 -07:00
Mike Brocchi
ae9817b7ee feat(@angular/cli): Update commands to extract meta data into JSON 2018-08-13 20:58:47 -07:00
Hans Larsen
5391cf307f fix(@angular/cli): if no command, properly show help
Using the first flag is bad, but we still support --version and --help.
2018-08-02 08:57:04 -04:00
Hans
a0978b1db3 refactor: fix types to remove any
require() returns any so we were missing some typing errors.
2018-07-11 13:35:35 -07:00
Alan Agius
f46a883330 refactor(@angular/cli): remove extra await
An async function always wraps the return value in a Promise. Using return await just adds extra time before the overreaching promise is resolved without changing the semantics.
2018-07-02 08:21:57 -04:00
Alex Eagle
d1e392fa78 refactor: add missing license headers under packages/angular/cli 2018-06-06 15:11:31 -07:00
Hans Larsen
44086c60ff build: move devkit repo back to angular-cli 2018-06-05 18:50:06 -07:00