Skip to content

Commit

Permalink
feat(angular): add ngrx root store generator (#16811)
Browse files Browse the repository at this point in the history
  • Loading branch information
Coly010 committed May 11, 2023
1 parent 2791544 commit e59c930
Show file tree
Hide file tree
Showing 16 changed files with 1,669 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/generated/manifests/menus.json
Original file line number Diff line number Diff line change
Expand Up @@ -4246,6 +4246,14 @@
"isExternal": false,
"disableCollapsible": false
},
{
"id": "ngrx-root-store",
"path": "/packages/angular/generators/ngrx-root-store",
"name": "ngrx-root-store",
"children": [],
"isExternal": false,
"disableCollapsible": false
},
{
"id": "pipe",
"path": "/packages/angular/generators/pipe",
Expand Down
9 changes: 9 additions & 0 deletions docs/generated/manifests/packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,15 @@
"path": "/packages/angular/generators/ngrx-feature-store",
"type": "generator"
},
"/packages/angular/generators/ngrx-root-store": {
"description": "Adds an NgRx Root Store to an application.",
"file": "generated/packages/angular/generators/ngrx-root-store.json",
"hidden": false,
"name": "ngrx-root-store",
"originalFilePath": "/packages/angular/src/generators/ngrx-root-store/schema.json",
"path": "/packages/angular/generators/ngrx-root-store",
"type": "generator"
},
"/packages/angular/generators/pipe": {
"description": "Generate an Angular Pipe",
"file": "generated/packages/angular/generators/pipe.json",
Expand Down
9 changes: 9 additions & 0 deletions docs/generated/packages-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,15 @@
"path": "angular/generators/ngrx-feature-store",
"type": "generator"
},
{
"description": "Adds an NgRx Root Store to an application.",
"file": "generated/packages/angular/generators/ngrx-root-store.json",
"hidden": false,
"name": "ngrx-root-store",
"originalFilePath": "/packages/angular/src/generators/ngrx-root-store/schema.json",
"path": "angular/generators/ngrx-root-store",
"type": "generator"
},
{
"description": "Generate an Angular Pipe",
"file": "generated/packages/angular/generators/pipe.json",
Expand Down
74 changes: 74 additions & 0 deletions docs/generated/packages/angular/generators/ngrx-root-store.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"name": "ngrx-root-store",
"factory": "./src/generators/ngrx-root-store/ngrx-root-store",
"schema": {
"$schema": "http://json-schema.org/schema",
"$id": "NxNgrxRootStoreGenerator",
"title": "Add NgRx support to an application.",
"description": "Adds NgRx support to an application.",
"cli": "nx",
"type": "object",
"properties": {
"project": {
"type": "string",
"description": "The name of the application to generate the NgRx configuration for.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What app would you like to generate a NgRx configuration for?",
"x-dropdown": "projects"
},
"minimal": {
"type": "boolean",
"default": true,
"description": "Only register the root state management setup or also generate a global feature state.",
"x-priority": "important"
},
"name": {
"type": "string",
"description": "Name of the NgRx state, such as `products` or `users`. Recommended to use the plural form of the name.",
"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": "''"
},
"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"
}
},
"additionalProperties": false,
"required": ["project"],
"presets": []
},
"description": "Adds an NgRx Root Store to an application.",
"implementation": "/packages/angular/src/generators/ngrx-root-store/ngrx-root-store.ts",
"aliases": [],
"hidden": false,
"path": "/packages/angular/src/generators/ngrx-root-store/schema.json",
"type": "generator"
}
5 changes: 5 additions & 0 deletions packages/angular/generators.json
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,11 @@
"schema": "./src/generators/ngrx-feature-store/schema.json",
"description": "Adds an NgRx Feature Store to an application or library."
},
"ngrx-root-store": {
"factory": "./src/generators/ngrx-root-store/ngrx-root-store",
"schema": "./src/generators/ngrx-root-store/schema.json",
"description": "Adds an NgRx Root Store to an application."
},
"pipe": {
"factory": "./src/generators/pipe/pipe",
"schema": "./src/generators/pipe/schema.json",
Expand Down
1 change: 1 addition & 0 deletions packages/angular/generators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export * from './src/generators/library/library';
export * from './src/generators/move/move';
export * from './src/generators/ngrx/ngrx';
export * from './src/generators/ngrx-feature-store/ngrx-feature-store';
export * from './src/generators/ngrx-root-store/ngrx-root-store';
export * from './src/generators/pipe/pipe';
export * from './src/generators/remote/remote';
export * from './src/generators/scam-directive/scam-directive';
Expand Down
Loading

1 comment on commit e59c930

@vercel
Copy link

@vercel vercel bot commented on e59c930 May 11, 2023

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-git-master-nrwl.vercel.app
nx.dev
nx-five.vercel.app
nx-dev-nrwl.vercel.app

Please sign in to comment.