-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(schematics): implement router store ng-add #1487
Conversation
add ng-add schematics, add schema implement tests Closes ngrx#1479
Preview docs changes for 51790c2 at https://previews.ngrx.io/pr1487-51790c2/ |
"aliases": ["init"], | ||
"factory": "./ng-add", | ||
"schema": "./ng-add/schema.json", | ||
"description": "Add router store class" |
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.
Update description to "Register @ngrx/router-store within your application"
"description": "Allows specification of the declaring module.", | ||
"alias": "m", | ||
"subtype": "filepath" | ||
} |
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.
The project
key is missing here.
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.
The project
keys are also missing in /modules/MODULE/schematics/ng-add/schema.json as they are merged with #1067, at least for effects, store or store-devtools. But for example in /modules/schematics/src/MODULE/schema.json they are included.
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.
Ok. That can be done in a separate PR.
add project property in collection.json change description in schema.json
Preview docs changes for 442109a at https://previews.ngrx.io/pr1487-442109a/ |
Add missing project keys to schema.json for store, store-devtools and effects Line-break remove related to "lint-staged" Related to ngrx#1487
Thanks @ngfelixl! |
Add ng-add schematics for the router-store
add schema
implement tests
Closes #1479
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
The user is not able to use Angular CLI to add the NgRX Router Store.
What is the new behavior?
The user is able to use Angular CLI to add the NgRX Router Store.
Does this PR introduce a breaking change?
Other information
Read the ng-add schematics implementation of the store-devtools and effects modules first. I have done this implementation with their code style in mind.
Is it correct to leave the module attribute inside the schema? Was not sure about this, since it just belongs in the root module, doesn't it? But the
store-devtools
schematics provides a module specification as well, so I decided to leave it as is.