-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(angular): add ngrx feature store generator (#16806)
- Loading branch information
Showing
30 changed files
with
2,598 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
docs/generated/packages/angular/generators/ngrx-feature-store.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
{ | ||
"name": "ngrx-feature-store", | ||
"factory": "./src/generators/ngrx-feature-store/ngrx-feature-store", | ||
"schema": { | ||
"$schema": "http://json-schema.org/schema", | ||
"$id": "NxNgrxFeatureStoreGenerator", | ||
"title": "NgRx Feature Store Generator", | ||
"description": "Add an NgRx Feature Store to an application or library.", | ||
"cli": "nx", | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"description": "Name of the NgRx feature state, such as `products` or `users`. Recommended to use the plural form of the name.", | ||
"$default": { "$source": "argv", "index": 0 }, | ||
"x-prompt": "What name would you like to use for the NgRx feature state? An example would be `users`.", | ||
"x-priority": "important" | ||
}, | ||
"parent": { | ||
"type": "string", | ||
"description": "The path to the file where the state will be registered. For NgModule usage, this will be your Feature Module. For Standalone API usage, this will be your 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-priority": "important" | ||
}, | ||
"route": { | ||
"type": "string", | ||
"description": "The route that the Standalone NgRx Providers should be added to. _Note: This is only supported in Angular versions >= 14.1.0_.", | ||
"default": "''" | ||
}, | ||
"minimal": { | ||
"type": "boolean", | ||
"default": false, | ||
"description": "Only register the feature state.", | ||
"x-priority": "important" | ||
}, | ||
"directory": { | ||
"type": "string", | ||
"default": "+state", | ||
"description": "The name of the folder used to contain/group the generated NgRx files." | ||
}, | ||
"facade": { | ||
"type": "boolean", | ||
"default": false, | ||
"description": "Create a Facade class for the the feature.", | ||
"x-prompt": "Would you like to use a Facade with your NgRx state?" | ||
}, | ||
"skipImport": { | ||
"type": "boolean", | ||
"default": false, | ||
"description": "Generate NgRx feature files without registering the feature in the NgModule." | ||
}, | ||
"skipFormat": { | ||
"description": "Skip formatting files.", | ||
"type": "boolean", | ||
"default": false, | ||
"x-priority": "internal" | ||
}, | ||
"skipPackageJson": { | ||
"type": "boolean", | ||
"default": false, | ||
"description": "Do not update the `package.json` with NgRx dependencies.", | ||
"x-priority": "internal" | ||
}, | ||
"barrels": { | ||
"type": "boolean", | ||
"default": false, | ||
"description": "Use barrels to re-export actions, state and selectors." | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"required": ["name"], | ||
"presets": [] | ||
}, | ||
"description": "Adds an NgRx Feature Store to an application or library.", | ||
"implementation": "/packages/angular/src/generators/ngrx-feature-store/ngrx-feature-store.ts", | ||
"aliases": [], | ||
"hidden": false, | ||
"path": "/packages/angular/src/generators/ngrx-feature-store/schema.json", | ||
"type": "generator" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
54eb7be
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
nx-dev – ./
nx-dev-nrwl.vercel.app
nx-five.vercel.app
nx-dev-git-master-nrwl.vercel.app
nx.dev