15 Commits

Author SHA1 Message Date
cexbrayat
3684df8aca fix(@angular/cli): remove redundant period in deprecation warning
As `parser.ts` currently always adds a period at the end of the warning message and the `x-deprecated` messages also have one, this removes the always added one to avoid a double period in the warning message.

Fixes:

    Option "styleext" is deprecated: Use "style" instead..

to:

    Option "styleext" is deprecated: Use "style" instead.
2018-12-14 10:43:40 -08:00
Michael Nahkies
7d88182935 fix(@angular/cli): pass arguments to all targets
When running a command with args against multiple targets, all targets
should be given the args. As parseArguments was mutating the passed args
array this wasn't the case. Fix by not mutating the array.

This was especially noticeable when using the `ng lint --fix` command
on a newly generated project, as files in the app target would be fixed,
but e2e target would be only be linted (with no fix)

Possibly closes #10657, #10656, #11005
2018-12-06 11:21:23 -08:00
Hans Larsen
3e9705f31b feat(@angular/cli): add warning for overriding flags in arguments
Fixes #12948
2018-11-19 17:20:34 -08:00
Alan Agius
d2a29afd48 fix(@angular/cli): handle case senstive aliases
Closes #12780
2018-11-15 17:09:54 -08: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
Alan Agius
131f55518c fix(@angular/cli): support all single dashes prefixed arguments (#12783)
Fixes #12771
2018-11-06 22:43:14 -08:00
Hans Larsen
5faf0cb535 fix(@angular/cli): numerical flags should not give 0 if empty
And numerical positional flags will be ignored.

If the value is an empty string, a number conversion would give 0. It is unexpected
from the user standpoint ("--num=" has the user expect a string value).
2018-09-27 12:46:15 -04:00
Hans Larsen
4daa299558 fix(@angular/cli): allow -a=value arguments
If a flag is followed by an equal sign, just treat it as a long name. So
the example above would translate to --a=value, while -abc=123 would be
"-a -b -c=123".

Fixes #12308
2018-09-27 12:46:15 -04:00
Hans Larsen
78a6fabb4a fix(@angular/cli): allow empty string arguments 2018-09-27 12:46:15 -04:00
Hans
97576ecd13 fix(@angular/cli): do not show stack on argument parse error 2018-09-19 13:02:40 -07:00
Hans
f7f5b28dae feat(@angular/cli): if parsing comes accross an obvious error throw it
We accumulate errors this way, and throw only once at the end, with messages for
all errors.
2018-09-19 13:02:40 -07:00
Hans
7d782a3f5e feat(@angular/cli): add support for parsing enums
Options can now contain enumerations of values.
2018-09-19 13:02:40 -07:00
Hans
34818b0346 feat(@angular/cli): add subcommand to options
SubCommands are not tied to the option that triggers them. They
contain a subset of a CommandDescription interface, with at least
a short and long description and usage notes. These are generated
from the subcommand schema (e.g. schematics in case of generate).
2018-09-19 13:02:40 -07:00
Hans
66fbc59767 feat(@angular/cli): add long description and suboption option type 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