Skip to content
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

Docs: Add instructions for using ng add #1770

Merged
merged 1 commit into from
Apr 23, 2019
Merged

Docs: Add instructions for using ng add #1770

merged 1 commit into from
Apr 23, 2019

Conversation

santoshyadavdev
Copy link
Contributor

Fixes #1739

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[X] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Closes #1739

What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[X] No

Other information

@ngrxbot
Copy link
Collaborator

ngrxbot commented Apr 17, 2019

Preview docs changes for 40f597a at https://previews.ngrx.io/pr1770-40f597a/

@ngrxbot
Copy link
Collaborator

ngrxbot commented Apr 18, 2019

Preview docs changes for 08c2463 at https://previews.ngrx.io/pr1770-08c2463/

@@ -15,3 +15,29 @@ For more information on using `yarn` check out the docs <a href="https://yarnpkg
```sh
yarn add @ngrx/schematics --dev
```

## Make @ngrx/scematics as default for app
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Make @ngrx/scematics as default for app
## Installing with `ng add`


## Make @ngrx/scematics as default for app

You can also make @ngrx/schematics as default for your app. Run below command inside an angular application from the root.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You can also make @ngrx/schematics as default for your app. Run below command inside an angular application from the root.
You can also make `@ngrx/schematics` the default collection for your application. Run the below command inside your Angular application from within the root.


`Do you want to use @ngrx/schematics as the default collection?(y/n)`

Once you select `yes` you can notice below line added to `package.json`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Once you select `yes` you can notice below line added to `package.json`.
Once you select `yes` it will change the `defaultCollection` inside `angular.json`.


Once you select `yes` you can notice below line added to `package.json`.

`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`
```json

`
"cli": {
"defaultCollection": "@ngrx/schematics"
}`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}`
}

"defaultCollection": "@ngrx/schematics"
}`

After this change you, are free to use any ngrx schematics without mentioning it
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
After this change you, are free to use any ngrx schematics without mentioning it
After this change you're able to use the NgRx schematics without the need to suffix the command, for example:


After this change you, are free to use any ngrx schematics without mentioning it

`ng g store State`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`ng g store State`
```bash
ng generate store State


`ng g store State`

the above command will create, a reducer file for us. you will notice a new file in `app/reducers`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove this line, as this isn't part of this schematic.

@santoshyadavdev
Copy link
Contributor Author

Thanks Tim , will update the PR.

@ngrxbot
Copy link
Collaborator

ngrxbot commented Apr 23, 2019

Preview docs changes for 24705ff at https://previews.ngrx.io/pr1770-24705ff/

@santoshyadavdev
Copy link
Contributor Author

Done with changes @timdeschryver you can review now.

@brandonroberts
Copy link
Member

This install page needs to be more consistent with the other pages. See https://ngrx.io/guide/store/install for an example

@santoshyadavdev
Copy link
Contributor Author

santoshyadavdev commented Apr 23, 2019

This install page needs to be more consistent with the other pages. See https://ngrx.io/guide/store/install for an example

Coo, will make the change

@santoshyadavdev
Copy link
Contributor Author

changes done @brandonroberts

@ngrxbot
Copy link
Collaborator

ngrxbot commented Apr 23, 2019

Preview docs changes for d181120 at https://previews.ngrx.io/pr1770-d181120/

@brandonroberts brandonroberts merged commit 2b83bef into ngrx:master Apr 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs: Add instructions for using ng add for schematics
4 participants