Skip to content

Commit

Permalink
Docs: Add instructions for using ng add
Browse files Browse the repository at this point in the history
Fixes #1739
  • Loading branch information
santoshyadavdev committed Apr 17, 2019
1 parent 5fbcb3c commit 40f597a
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions projects/ngrx.io/content/guide/schematics/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

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

```sh
ng add @ngrx/schematics
```

It will prompt you with:

`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`.

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

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

`ng g store State`

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

0 comments on commit 40f597a

Please sign in to comment.