fix(angular): update ngrx parent description to give better info about standalone api usage (#16755)

This commit is contained in:
Colum Ferry 2023-05-04 11:11:06 +01:00 committed by GitHub
parent b526e1d600
commit 0a81c64560
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 6 deletions

View File

@ -10,12 +10,20 @@
"type": "object", "type": "object",
"examples": [ "examples": [
{ {
"command": "nx g @nrwl/angular:ngrx --root --module=apps/my-app/src/app/app.module.ts --facade=false placeholder", "command": "nx g @nrwl/angular:ngrx --root --parent=apps/my-app/src/app/app.module.ts --facade=false placeholder",
"description": "Add root ngrx configration to the `my-app` application" "description": "Add root ngrx configration to the `my-app` application"
}, },
{ {
"command": "nx g @nrwl/angular:ngrx --module=libs/my-lib/src/lib/my-lib.module.ts --facade=true --root=false users", "command": "nx g @nrwl/angular:ngrx --parent=libs/my-lib/src/lib/my-lib.module.ts --facade=true --root=false users",
"description": "Add a `users` state with a facade to the `my-lib` library. It will be tracked under the default `+state` folder in the lib" "description": "Add a `users` state with a facade to the `my-lib` library. It will be tracked under the default `+state` folder in the lib"
},
{
"command": "nx g @nrwl/angular:ngrx --parent=apps/my-app/src/app/app.config.ts --root",
"description": "Add a root state configuration to `my-app` when `my-app` uses Standalone APIs"
},
{
"command": "nx g @nrwl/angular:ngrx --parent=libs/my-lib/src/lib.routes.ts users",
"description": "Add a `users` feature state to the Route definition of a library using Standalone APIs"
} }
], ],
"properties": { "properties": {
@ -33,7 +41,7 @@
}, },
"parent": { "parent": {
"type": "string", "type": "string",
"description": "The path to the `NgModule` or the `Routes` definition file (for Standalone API usage) where the feature state will be registered. The host directory will create/use the new state directory. _Note: The Standalone API usage is only supported in Angular versions >= 14.1.0_.", "description": "The path to the file where the state will be registered. For NgModule usage, this will be your `app.module.ts` for your root state, or your Feature Module for feature state. For Standalone API usage, this will be your `app.config.ts` file for your root state, or the Routes definition file for your feature state. The host directory will create/use the new state directory. _Note: The Standalone API usage is only supported in Angular versions >= 14.1.0_.",
"x-prompt": "What is the path to the module or Routes definition where this NgRx state should be registered?", "x-prompt": "What is the path to the module or Routes definition where this NgRx state should be registered?",
"x-priority": "important" "x-priority": "important"
}, },

View File

@ -7,12 +7,20 @@
"type": "object", "type": "object",
"examples": [ "examples": [
{ {
"command": "nx g @nrwl/angular:ngrx --root --module=apps/my-app/src/app/app.module.ts --facade=false placeholder", "command": "nx g @nrwl/angular:ngrx --root --parent=apps/my-app/src/app/app.module.ts --facade=false placeholder",
"description": "Add root ngrx configration to the `my-app` application" "description": "Add root ngrx configration to the `my-app` application"
}, },
{ {
"command": "nx g @nrwl/angular:ngrx --module=libs/my-lib/src/lib/my-lib.module.ts --facade=true --root=false users", "command": "nx g @nrwl/angular:ngrx --parent=libs/my-lib/src/lib/my-lib.module.ts --facade=true --root=false users",
"description": "Add a `users` state with a facade to the `my-lib` library. It will be tracked under the default `+state` folder in the lib" "description": "Add a `users` state with a facade to the `my-lib` library. It will be tracked under the default `+state` folder in the lib"
},
{
"command": "nx g @nrwl/angular:ngrx --parent=apps/my-app/src/app/app.config.ts --root",
"description": "Add a root state configuration to `my-app` when `my-app` uses Standalone APIs"
},
{
"command": "nx g @nrwl/angular:ngrx --parent=libs/my-lib/src/lib.routes.ts users",
"description": "Add a `users` feature state to the Route definition of a library using Standalone APIs"
} }
], ],
"properties": { "properties": {
@ -33,7 +41,7 @@
}, },
"parent": { "parent": {
"type": "string", "type": "string",
"description": "The path to the `NgModule` or the `Routes` definition file (for Standalone API usage) where the feature state will be registered. The host directory will create/use the new state directory. _Note: The Standalone API usage is only supported in Angular versions >= 14.1.0_.", "description": "The path to the file where the state will be registered. For NgModule usage, this will be your `app.module.ts` for your root state, or your Feature Module for feature state. For Standalone API usage, this will be your `app.config.ts` file for your root state, or the Routes definition file for your feature state. The host directory will create/use the new state directory. _Note: The Standalone API usage is only supported in Angular versions >= 14.1.0_.",
"x-prompt": "What is the path to the module or Routes definition where this NgRx state should be registered?", "x-prompt": "What is the path to the module or Routes definition where this NgRx state should be registered?",
"x-priority": "important" "x-priority": "important"
}, },