-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: reorganize installation instructions into individual pages for …
- Loading branch information
1 parent
e1d617c
commit d6cc83c
Showing
13 changed files
with
244 additions
and
57 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Installation | ||
|
||
## Installing with `npm` | ||
|
||
For more information on using `npm` check out the docs <a href="https://docs.npmjs.com/cli/install" target="_blank">here</a>. | ||
|
||
```sh | ||
npm install @ngrx/effects --save | ||
``` | ||
|
||
## Installing with `yarn` | ||
|
||
For more information on using `yarn` check out the docs <a href="https://yarnpkg.com/docs/usage" target="_blank">here</a>. | ||
|
||
```sh | ||
yarn add @ngrx/effects | ||
``` | ||
|
||
## Installing with `ng add` | ||
|
||
If your project is using the Angular CLI 6+ then you can install the Effects to your project with the following `ng add` command <a href="https://angular.io/cli/add" target="_blank">(details here)</a>: | ||
|
||
```sh | ||
ng add @ngrx/effects | ||
``` | ||
### Optional `ng add` flags | ||
|
||
* path - path to the module that you wish to add the import for the `EffectsModule` to. | ||
* flat - Indicate if a directoy is to be created to hold your effects file | ||
* spec - Specifies if a spec file is generated. | ||
* project - name of the project defined in your `angular.json` to help locating the module to add the `EffectsModule` to. | ||
* module - name of file containing the module that you wish to add the import for the `EffectsModule` to. Can also include the relative path to the file. For example, `src/app/app.module.ts` | ||
* group - Group effects file within `effects` folder | ||
|
||
This command will automate the following steps: | ||
|
||
1. Update `package.json` > `dependencies` with `@ngrx/effects`. | ||
2. Run `npm install` to install those dependencies. | ||
3. By default will create a `src/app/app.effects.ts` file with an empty `AppEffects` class that has the `actions$: Actions` observable injected into it. If group flag is set to true then this file will be created under an `effects` folder. | ||
4. Create a `src/app/app.effects.spec.ts` spec file with a basic unit test. If group flag is set to true then this file will be created under an `effects` folder. | ||
5. Update your `src/app/app.module.ts` > `imports` array with `EffectsModule.forRoot([AppEffects])`. If you provided flags then the command will attempt to locate and update module found by the flags. | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Installation | ||
|
||
## Installing with `npm` | ||
|
||
For more information on using `npm` check out the docs <a href="https://docs.npmjs.com/cli/install" target="_blank">here</a>. | ||
|
||
```sh | ||
npm install @ngrx/entity --save | ||
``` | ||
|
||
## Installing with `yarn` | ||
|
||
For more information on using `yarn` check out the docs <a href="https://yarnpkg.com/docs/usage" target="_blank">here</a>. | ||
|
||
```sh | ||
yarn add @ngrx/entity | ||
``` | ||
|
||
## Installing with `ng add` | ||
|
||
If your project is using the Angular CLI 6+ then you can install the Entity to your project with the following `ng add` command <a href="https://angular.io/cli/add" target="_blank">(details here)</a>: | ||
|
||
```sh | ||
ng add @ngrx/entity | ||
``` | ||
|
||
This command will automate the following steps: | ||
|
||
1. Update `package.json` > `dependencies` with `@ngrx/entity`. | ||
2. Run `npm install` to install those dependencies. | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Installation | ||
|
||
## Installing with `npm` | ||
|
||
For more information on using `npm` check out the docs <a href="https://docs.npmjs.com/cli/install" target="_blank">here</a>. | ||
|
||
```sh | ||
npm install @ngrx/router-store --save | ||
``` | ||
|
||
## Installing with `yarn` | ||
|
||
For more information on using `yarn` check out the docs <a href="https://yarnpkg.com/docs/usage" target="_blank">here</a>. | ||
|
||
```sh | ||
yarn add @ngrx/router-store | ||
``` | ||
|
||
## Installing with `ng add` | ||
|
||
If your project is using the Angular CLI 6+ then you can install the Router Store to your project with the following `ng add` command <a href="https://angular.io/cli/add" target="_blank">(details here)</a>: | ||
|
||
```sh | ||
ng add @ngrx/router-store | ||
``` | ||
|
||
### Optional `ng add` flags | ||
|
||
* path - path to the module that you wish to add the import for the `StoreRouterConnectingModule` to. | ||
* project - name of the project defined in your `angular.json` to help locating the module to add the `StoreRouterConnectingModule` to. | ||
* module - name of file containing the module that you wish to add the import for the `StoreRouterConnectingModule` to. Can also include the relative path to the file. For example, `src/app/app.module.ts`; | ||
|
||
This command will automate the following steps: | ||
|
||
1. Update `package.json` > `dependencies` with `@ngrx/router-store`. | ||
2. Run `npm install` to install those dependencies. | ||
3. By default, will update `src/app/app.module.ts` > `imports` array with `StoreRouterConnectingModule.forRoot()`. If you provided flags then the command will attempt to locate and update module found by the flags. | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Installation | ||
|
||
## Installing with `npm` | ||
|
||
For more information on using `npm` check out the docs <a href="https://docs.npmjs.com/cli/install" target="_blank">here</a>. | ||
|
||
```sh | ||
npm install @ngrx/schematics --save-dev | ||
``` | ||
|
||
## Installing with `yarn` | ||
|
||
For more information on using `yarn` check out the docs <a href="https://yarnpkg.com/docs/usage" target="_blank">here</a>. | ||
|
||
```sh | ||
yarn add @ngrx/schematics --dev | ||
``` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Installation | ||
|
||
## Installing with `npm` | ||
|
||
For more information on using `npm` check out the docs <a href="https://docs.npmjs.com/cli/install" target="_blank">here</a>. | ||
|
||
```sh | ||
npm install @ngrx/store-devtools --save | ||
``` | ||
|
||
## Installing with `yarn` | ||
For more information on using `yarn` check out the docs <a href="https://yarnpkg.com/docs/usage" target="_blank">here</a>. | ||
|
||
```sh | ||
yarn add @ngrx/store-devtools | ||
``` | ||
|
||
## Installing with `ng add` | ||
|
||
If your project is using the Angular CLI 6+ then you can install the Store Devtools to your project with the following `ng add` command <a href="https://angular.io/cli/add" target="_blank">(details here)</a>: | ||
|
||
```sh | ||
ng add @ngrx/store-devtools | ||
``` | ||
|
||
### Optional `ng add` flags | ||
|
||
* path - path to the module that you wish to add the import for the `StoreDevtoolsModule` to. | ||
* project - name of the project defined in your `angular.json` to help locating the module to add the `StoreDevtoolsModule` to. | ||
* module - name of file containing the module that you wish to add the import for the `StoreDevtoolsModule` to. Can also include the relative path to the file. For example, `src/app/app.module.ts`; | ||
* maxAge - number (>1) | 0 - maximum allowed actions to be stored in the history tree. The oldest actions are removed once maxAge is reached. It's critical for performance. 0 is infinite. Default is 25 for performance reasons. | ||
|
||
This command will automate the following steps: | ||
|
||
1. Update `package.json` > `dependencies` with `@ngrx/store-devtools`. | ||
2. Run `npm install` to install those dependencies. | ||
3. Update your `src/app.module.ts` > `imports` array with `StoreDevtoolsModule.instrument({ maxAge: 25, logOnly: environment.production })`. The maxAge property will be set to the flag `maxAge` if provided. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Installation | ||
|
||
## Installing with `npm` | ||
|
||
For more information on using `npm` check out the docs <a href="https://docs.npmjs.com/cli/install" target="_blank">here</a>. | ||
|
||
```sh | ||
npm install @ngrx/store --save | ||
``` | ||
|
||
## Installing with `yarn` | ||
|
||
For more information on using `yarn` check out the docs <a href="https://yarnpkg.com/docs/usage" target="_blank">here</a>. | ||
|
||
```sh | ||
yarn add @ngrx/store | ||
``` | ||
|
||
## Installing with `ng add` | ||
|
||
If your project is using the Angular CLI 6+ then you can install the Store to your project with the following `ng add` command <a href="https://angular.io/cli/add" target="_blank">(details here)</a>: | ||
|
||
```sh | ||
ng add @ngrx/store | ||
``` | ||
|
||
### Optional `ng add` flags | ||
|
||
* path - path to the module that you wish to add the import for the `StoreModule` to. | ||
* project - name of the project defined in your `angular.json` to help locating the module to add the `StoreModule` to. | ||
* module - name of file containing the module that you wish to add the import for the `StoreModule` to. Can also include the relative path to the file. For example, `src/app/app.module.ts`; | ||
* statePath - The file path to create the state in. By default, this is `reducers`. | ||
* stateInterface - The type literal of the defined interface for the state. By default, this is `State`. | ||
|
||
This command will automate the following steps: | ||
|
||
1. Update `package.json` > `dependencies` with `@ngrx/store`. | ||
2. Run `npm install` to install those dependencies. | ||
3. Create a `src/app/reducers` folder, unless the `statePath` flag is provided, in which case this would be created based on the flag. | ||
4. Create a `src/app/reducers/index.ts` file with an empty `State` interface, an empty `reducers` map, and an empty `metaReducers` array. This may be created under a different directory if the `statePath` flag is provided. | ||
5. Update your `src/app/app.module.ts` > `imports` array with `StoreModule.forRoot(reducers, { metaReducers })`. If you provided flags then the command will attempt to locate and update module found by the flags. |
Oops, something went wrong.