50 Commits

Author SHA1 Message Date
Alan Agius
b15e827580 refactor(@schematics/angular): remove deprecated appId option
Remove deprecated unused options from schematics.

BREAKING CHANGE: App-shell and Universal schematics deprecated unused `appId` option has been removed.
2023-08-10 11:02:23 -07:00
Alan Agius
603d24f966 fix(@schematics/angular): rename app.server.module.ts to app.module.server.ts
This fixes an issue were we generated files using inconsistent names example `app.server.module.ts` and `app.config.server.ts`.
2023-04-25 15:19:36 +00:00
Alan Agius
50b9e59a50 feat(@schematics/angular): update app-shell schematic to support standalone applications
This commit adds support to run `ng generate app-shell` in standalone applications.
2023-03-29 16:42:49 +00:00
Alan Agius
c9e84d0243 feat(@schematics/angular): remove generation of BrowserModule.withServerTransition
This commit removes generation of `.withServerTransition` in the universal schematic as is deprecated.

 DEPRECATED: the `app-id` option in the app-shell and universal schematics has been deprecated without replacement. See: https://github.com/angular/angular/pull/49422 for more information about the rational of this change.
2023-03-24 20:37:32 +00:00
Alan Agius
207358afb8 feat(@angular-devkit/schematics): add runSchematic and runExternalSchematic methods
These async methods are a replacement for the Observable based `runSchematicAsync` and `runExternalSchematicAsync` methods.

DEPRECATED:
The Observable based `SchematicTestRunner.runSchematicAsync` and `SchematicTestRunner.runExternalSchematicAsync` method have been deprecated in favor of the Promise based `SchematicTestRunner.runSchematic` and `SchematicTestRunner.runExternalSchematic`.
2022-12-08 14:49:43 -08:00
Alan Agius
69b2214987 refactor(@schematics/angular): remove deprecated appDir option
BREAKING CHANGE: Removed unused`appDir` option from Universal and App-Shell schematic. This option can safely be removed  if present since it no longer has effect.
2022-08-30 12:25:05 -04:00
Alan Agius
68358f0c37 docs: remove long-description from schematics
These long descriptions were and are only handled at the Angular CLI level which makes these redundant.
2022-07-08 18:10:05 +02:00
Alan Agius
e751464ea3 fix(@angular/cli): populate path with working directory in nested schematics
With this change we change the how we handle `"format": "path"` schematic property option. We replace the formatter in favour of a `SmartDefaultProvider`, which ensures that nested schematics can access the `workingDirectory`.
2022-05-24 10:19:30 -07:00
Charles Lyding
a0e3de2b5f refactor(@schematics/angular): use Tree's newly introduced readText and readJSON functionality
Code related to decoding buffers into strings and parsing content into JSON can now be removed by using the
support provided directly from the Tree instance for the executing schematic.
2022-04-26 19:24:55 -04:00
Alan Agius
9ddb220c3d docs: replace app with application 2022-03-14 10:03:06 -04:00
Alan Agius
2e0493130a refactor(@angular/cli): replace command line arguments parser
With this change we refactor the Angular CLI and replace the underlying args parser and command builder. We choose to use Yargs as our parser and command builder of choice. The main advantages of Yargs over other command builders are;

- Highly configurable.
- We already use it in other packages such as the compiler-cli/dev-infra etc..
- Commands and options can be added during runtime. This is a requirement that is needed to support architect and schematics commands.
- Outstanding documentation.
- The possibility to parse args without parser configuration (Free form).
- Commands are built lazily based on the arguments passed.

BREAKING CHANGE:

Several changes in the Angular CLI commands and arguments handling.

- `ng help` has been removed in favour of the `—-help` option.
- `ng —-version` has been removed in favour of `ng version` and `ng v`.
- Deprecated camel cased arguments are no longer supported. Ex. using `—-sourceMap` instead of `—-source-map` will result in an error.
- `ng update`, `—-migrate-only` option no longer accepts a string of migration name, instead use `—-migrate-only -—name <migration-name>`.
- `—-help json` help has been removed.

Closes #20976, closes #16614 and closes #16241
2022-03-09 17:18:53 +01:00
Charles Lyding
51f89d633f test: enable no-useless-escape lint rule
The `no-useless-escape` eslint rule has now been enabled which removes unneeded characters and complexity from string literals and regular expressions. All files that were in violation of this rule have also been corrected.
2021-08-24 10:51:14 +01:00
Alan Agius
4ed1c4f42d fix(@schematics/angular): replace clientProject with project 2021-05-05 11:49:22 -04:00
Alan Agius
586226a305 fix(@angular/cli): infer schematic defaults correctly when using --project
Previously, the `--project` flag was ignored when gathering and merging the schematics defaults from the angular workspace configuration file.

Closes #20666
2021-05-05 11:49:22 -04: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
Alan Agius
076ab0f11f refactor: add correct schema keys
With this change
- We replace `id` with `$id`,  this no longer valid in draft-07.
- Replace all `$schemas` to `http://json-schema.org/draft-07/schema`, this is needed to "pin" the schema to `draft-07`.

More information about `draft-07` can be found https://json-schema.org/draft-07/json-schema-release-notes.html
2021-04-13 10:51:12 -04:00
Alan Agius
ba6f546a02 fix(@schematics/angular): add additionalProperties to all schemas 2021-03-10 08:17:50 -06:00
Alan Agius
1de6d71edd feat(@schematics/angular): production builds by default
With this change we do several changes to the `angular.json` configuration for `build` , `server` and `app-shell` targets so that these are `production` by default.

- build, server and app-shell targets are configured to run production by default.
- We add a new configuration named `development` to run the mentioned builder targets in development. Ex: `ng build --configuration development`.
- When adding `universal` or `app-shell`, we generate the full set of configurations as per the `buiid` target. Previously, we only generated the `production` configuration.
- We added a helper script in `package.json` to run build in watch mode. `npm run watch` which is a shortcut for `ng build --watch --configuration development`
2021-03-10 08:16:38 -06:00
Alan Agius
197e96b8c5 refactor(@angular-devkit/build-angular): remove deprecated scripts[].lazy and styles[].lazy
BREAKING CHANGE:

- Deprecated `scripts[].lazy` has been renamed with `scripts[].inject`
- Deprecated `styles[].lazy` has been renamed with `styles[].inject`

Note: this change only effects direct `@angular-devkit/build-angular` users and not application developers. Users will be migrated automatically off these options.
2020-08-31 11:54:23 +01:00
Charles Lyding
dd58aa6210 refactor(@schematics/angular): avoid InsertChange type assumptions
This change introduces a helper function (`applyToUpdateRecorder`) that handles all known `Change` classes.  The use of this helper function removes type assumptions within the schematics.  Many of these assumptions caused compilation errors when strict TypeScript options are enabled.
2020-08-03 15:39:55 -04:00
Charles Lyding
994aab7485 refactor(@schematics/angular): use type guard based narrowing with TS AST
By leveraging TypeScript's AST type guards, function parameter assumptions and casting can be removed.  Many of these cases caused errors when enabling TypeScript's strict option. This is preliminary work to support enabling full TypeScript strict mode within the project.
2020-08-03 15:39:55 -04:00
Alan Agius
abdc6aa11c refactor: deprecate tsconfigFileName in app-shell schematic 2020-06-06 00:11:23 +01:00
Alan Agius
ac3aff20c0 refactor(@schematics/angular): remove deprecated options from app-shell and universal schematics
BREAKING CHANGE:  The below options have been removed as they had no effect
- `test` and `testTsconfigFileName` have been removed form the universal schematic
- `universalProject`, `name`, `outDir`, `root` and `index` have been removed from the app-shell schematic
2020-05-06 11:42:49 -07:00
Alan Agius
66c4e48c7f docs: remove reference to client-project arguments from app-shell docs
This is no longer required because of 493aa74019/packages/schematics/angular/app-shell/schema.json (L12)
2020-04-24 09:52:10 -07:00
Alan Agius
073f3034a1 docs: remove universal-project options reference from app-shell docs
`universal-project` has been deprecated and has no effect. See: 493aa74019/packages/schematics/angular/app-shell/schema.json (L19)
2020-04-24 09:52:10 -07:00
Alan Agius
e523a4865b feat(@schematics/angular): support adding app-shell without specifying clientProject
When unset we set the clientProject to the resolved packageName from the current working directory
2019-09-25 10:00:35 -07:00
Alan Agius
643ff77d54 fix(@schematics/angular): support adding app-shell after nguniversal schematics (#15606) 2019-09-18 14:50:02 +01:00
Alan
bcbbd1b8ca refactor(@schematics/angular): deprecate options that are unused 2019-09-10 10:02:09 -07:00
Alan Agius
ec8fb3712f refactor: deprecate universalProject in app-shell schematics as it's unused 2019-08-21 10:35:37 -07:00
Charles Lyding
5a7b823b28 test: remove use of deprecated synchronous test helper runSchematic 2019-08-08 08:27:31 -07:00
Charles Lyding
ca1ecb027d test(@schematics/angular): ensure application schematic is run async 2019-04-16 11:23:48 -07:00
Charles Lyding
83f3c6c39e refactor(@schematics/angular): update app-shell to use new workspace rules 2019-04-15 11:02:46 -07:00
Alex Eagle
bf1c069f73 refactor(@schematics/angular): drop dependency on TypeScript package
instead, vendor in the two files we actually need.
This reduces our install footprint by 5MB
2019-03-06 11:27:48 -08:00
Alan Agius
bf566c7101 build: update karma and jasmine dependencies (#13566)
* feat(@schematics/angular): update karma and jasmine dependencies

* feat(@angular-devkit/build-angular): update karma and jasmine dependencies

* build: update karma and jasmine dependencies

* test: add test expectations in shell component
2019-02-05 21:15:08 -08:00
Judy Bogart
1a3ba03a59 docs: add long description to app-shell subcommand 2019-01-19 12:26:52 -08:00
Alan
4718de4dae feat(@schematics/angular): only support known style extentions
Fixes #13149
2019-01-18 11:56:19 -08:00
Judy Bogart
ed6e765471
docs: add generation schematics option docs 2018-11-13 13:09:51 -08:00
puku0x
258df041c3 fix(@schematics/angular): add serverTarget to app shell production configuration 2018-11-01 10:32:26 -07:00
Hans
f15d5589c3 refactor(@schematics/angular): automated JSON schema generation 2018-09-13 16:44:17 -07:00
Charles Lyding
57c049e507 test: update to support targets & architect fields 2018-09-13 16:43:31 -07:00
Alan Agius
82f2bda2f5 refactor(@schematics/angular): make interaction with architect targets type safe 2018-09-12 12:37:24 -07:00
Yaroslav Admin
a5bb3ced10 fix(@schematics/angular): fix app shell schematic failure
Fixes #10093
2018-09-10 14:22:14 -07:00
Alan Agius
616ffe70f8 fix(@schematics/angular): app shell schematic does not use production configuration
Closes: #11578
2018-09-06 10:55:39 -07:00
Charles Lyding
d202480a17 build: update/cleanup tslint rules & fix errors 2018-08-23 11:35:34 -07:00
Filipe Silva
9720077a4b build: make resolution logic compatible with Bazel 2018-08-22 16:36:10 -07:00
Mike Brocchi
f64087b625 fix(@schematics/angular): Allow additionalProperties in schematics options
fixes #11681
2018-08-03 12:38:27 -04:00
Filipe Silva
38fda3ea60 fix(@schematics/angular): support updating projects that use the targets property 2018-07-25 20:17:33 +01:00
Hans Larsen
44086c60ff build: move devkit repo back to angular-cli 2018-06-05 18:50:06 -07:00