53 Commits

Author SHA1 Message Date
Charles Lyding
56f802b7dd feat(@angular/cli): ask to install angular-eslint when running ng lint in new projects
To improve the developer experience for the `ng lint` command in new projects, the lint command will now ask the developer if they wish to install `@angular-eslint/schematics` when no lint target has been configured for the specified project. `@angular-eslint/schematics` is currently the only option listed in the warning shown prior to the introduction of the prompt in this change. If additional example packages are added to the warning text in the future, the confirmation prompt should be changed to a list prompt which would allow the user to pick one of the potential future listed example packages.

Closes: #21387
2021-11-22 08:55:35 +01:00
Charles Lyding
ecd9fb5c77 feat(@angular/cli): provide more detailed error for not found builder
When a builder-based command is executed (build, serve, test, etc.) and the builder's node package cannot be found a more user-friendly error message is now displayed. In addition, when the builder's node package cannot be found, a check is performed to determine if the node packages for the workspace may have not been installed. Previously, a potentially long stacktrace was shown which did not provide much information regarding how to correct the issue.

Closes: #10536
2021-11-17 09:30:54 +00:00
Charles Lyding
9afe185fc6 build: enable noImplicitOverride TypeScript option
The `noImplicitOverride` TypeScript option improves code quality by ensuring that properties from base classes are not accidentally overriden.
Reference: https://www.typescriptlang.org/tsconfig#noImplicitOverride
2021-07-02 06:40:36 -04:00
Alan Agius
06af7d7e7b fix(@angular-devkit/core): handle async schema validations 2021-05-31 12:48:18 +01:00
Alan Agius
ddb92d815e fix(@angular/cli): improve --prod deprecation warning
Closes  #20806
2021-05-17 18:04:27 +02:00
Charles Lyding
c1512e4274 build: update files to be eslint compliant
All TypeScript files have been updated to pass the new eslint-based linting checks. eslint compatible disabling comments have also been added in place of the previous tslint comments.
2021-05-03 07:31:02 -04:00
Charles Lyding
37a06a7c37 build: format all files
All files are now formatted using the ng-dev tools via prettier.
2021-04-28 16:05:49 -07:00
Joey Perrott
003854257c build: migrate all file header to use Google LLC rather than Google Inc 2021-04-27 08:35:22 +02:00
Charles Lyding
06335515eb fix(@angular/cli): avoid exceptions for expected errors in architect commands
Errors caused by invalid options or workspace configuration will now be presented as fatal console messages and the CLI will exit gracefully with an exit code of 1.
2021-03-10 08:19:42 -06:00
Alan Agius
a5877bf917 feat(@angular/cli): deprecate --prod command line argument
With this change we deprecated the `--prod` command line argument. This argument is confusing especially to new users, since users expect that this builds an application in production mode. This however, is only an alias for `--configuration="production"`
2021-03-10 08:16:38 -06:00
Alan Agius
90988aaf52 fix(@angular/cli): collect analytics option usage from workspace config and prompts
With this change we fix two analytics collection bugs:
- We now collect the usage of options defined in the workspace config (angular.json).
- We now also collect values set via schematic prompts.

Closes: #17900
2020-10-07 09:54:59 -04:00
Charles Lyding
b2b536789b refactor(@angular/cli): discover/load workspace on startup
Previously, the workspace configuration file was found and loaded by individual commands potentially multiple times.  This change moves the initial workspace location discovery and loading of the workspace to the CLI startup.  It also provides the workspace to each command so that the commands can reuse the already loaded and parsed workspace configuration.
2020-10-02 07:53:07 -04:00
Keen Yee Liau
297fc923ab build: remove experimental build event protocol 2020-09-11 13:24:38 -04:00
Alan Agius
e40c72a8dc feat(@angular-devkit/architect-cli): show warning when using deprecated options 2020-08-17 18:18:24 +02:00
Alan Agius
c824bbb4f7 refactor(@angular/cli): update CLI package to be strict compliant 2020-08-12 19:29:13 +01:00
Alan Agius
05588fcee1 refactor: clean up unused code and imports 2020-07-24 08:01:52 +02:00
Kishan Gajera
ba0f7acce2 fix(@angular/cli): throw error when specified project does not exist
Currently this falls through to a misleading error for an unsupported build target.

Closes #17682
2020-06-16 09:44:05 +02:00
Filipe Silva
65c2a1965f feat(@angular/cli): support using multiple configurations
It's now possible to use multiple configurations by separating them with a comma:
```
ng build --configuration=one,two,three
```

They will be applied from left to right. If `--prod` is also present, it will be considered to be the first configuration and thus able to be overriden.

You can also use it in target strings:
```
        "serve": {
          "builder": "@angular-devkit/build-angular:dev-server",
          "options": {
            "browserTarget": "latest-project:build:one,two"
          },
          "configurations": {
            "production": {
              "browserTarget": "latest-project:build:production,one,two"
            }
          }
```

Fix https://github.com/angular/angular-cli/issues/10612
2019-10-14 13:40:48 -07:00
Alan Agius
26dd51221a style: collapse if statements (#15449) 2019-08-27 10:25:14 -07:00
mgechev
5df50bacbe feat(@angular/cli): implement deploy command 2019-07-30 21:07:50 -07:00
Charles Lyding
5b5f140109 refactor(@angular/cli): use stable workspace API 2019-07-10 04:05:26 +08:00
Alan
c7135fae35 fix(@angular-devkit/build-angular): browser builder should not swollow error messages
Closes #14813
2019-06-19 17:07:27 -07:00
Charles Lyding
3912fdee5d fix(@angular/cli): enable analytics for safe builders
Fixes #14355
2019-05-13 15:55:15 -07:00
Charles Lyding
8254cfe87f fix(@angular/cli): honor builder schema additional properties option
Fixes #14354
2019-05-09 10:07:42 -07:00
Charles Lyding
a818badbb2 fix(@angular/cli): remove Angular specific version check from base architect command
Fixes #14266
2019-04-25 10:23:25 -07:00
Filipe Silva
5ec27db6bc feat(@angular/cli): verify Angular version is supported 2019-04-15 11:31:34 -07:00
Charles Lyding
e0043b4078 refactor(@angular/cli): cleanup architect imports 2019-04-04 19:49:56 -07:00
Charles Lyding
e41e10d313 feat(@angular/cli): support stable architect API 2019-03-27 16:33:39 -07:00
Hans Larsen
2e58fb33ca feat(@angular/cli): add custom implementation for analytics for commands
Some commands (like schematics) need to have custom reporting for
analytics. Schematics and Architect commands need to verify if the
schematic/architect builder run is in the safelist, for example.
2019-03-20 15:08:07 -07:00
Charles Lyding
f066e99e3a feat(@angular/cli): initial minimal BEP support 2018-12-11 11:58:05 -08:00
Alan Agius
45b6df511f fix(@angular-devkit/build-angular): lint non human readable formatters produces invalid output
fixes #12674
2018-12-06 11:24:27 -08:00
Charles Lyding
5e7f995001 fix(@angular/cli): improve architect command project parsing 2018-11-15 17:09:30 -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
bd4dc38359 refactor: use createConsoleLogger and remove duplicate code (#12787) 2018-11-08 10:30:41 -08:00
Alan Agius
2bb26f197b fix(@ngtools/webpack): print error message on new line (#12764)
* fix(@ngtools/webpack): print error message on new line

* fix(@angular/cli): change logger from `warning` to `fatal` for unkown options
2018-10-31 21:02:25 -07:00
Charles Lyding
5af69ba43b refactor(@angular/cli): remove rxjs direct dependency 2018-10-31 14:53:56 -07:00
Hans Larsen
aa25a33448 feat(@angular/cli): show project being linted
Fixes #11231
2018-09-27 13:20:19 -04:00
Alan Agius
43fff130a5 fix(@angular/cli): cannot use same target name in when having multiple projects (#12327)
Closes #12320
2018-09-21 12:27:11 -07:00
Hans
0b959d1233 * fix(@angular/cli): remove helpJson and help-json mentions (#12331)
* fix(@angular/cli): remove helpJson and help-json mentions

* ci: use proper --help=json for creating snapshot
2018-09-20 14:45:09 -07:00
Hans
84e4e8d7d8 fix(@angular/cli): run --help-json now returns a basic help
It was throwing an exception about some targets not being available.
2018-09-14 21:29:31 -07:00
Hans Larsen
30b0cbda0d refactor(@angular/cli): automated JSON schema interface generation 2018-09-13 16:44:17 -07:00
Hans
c72c45f9db fix(@angular/cli): only add options if theres only one builder configuration 2018-09-06 07:37:48 -07:00
Hans
c8ddfbbe62 fix(@angular/cli): add options in help for architect commands
And fix a bug with json schema to Option array.
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
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
Charles Lyding
d202480a17 build: update/cleanup tslint rules & fix errors 2018-08-23 11:35:34 -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
c45e778687 feat(@angular/cli): allow overrides on multi-target if builder is same
It makes sense and is the only way to allow "ng lint --fix". If the builder is the
same for all targets, overrides are allowed.
2018-07-25 21:27:47 -07:00
Hans
14357e30c0 refactor(@angular/cli): remove a tslint:disable:no-global-tslint-disable no-any
Not entirely removed the usage of any but its a step in the right direction.
2018-07-25 21:27:47 -07:00
Alan Agius
43e21ab606 refactor: fix path for workspace-loader 2018-07-09 09:38:58 -04:00