Skip to content

Commit

Permalink
Merge branch 'make-rxjs-dep'
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffbski committed Sep 13, 2017
2 parents 4830e8e + 3b890b8 commit ba224af
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,15 @@ These changes are not breaking but they are noteworthy since they prepare for th

## Usage

redux-logic uses rxjs@5 under the covers and to prevent multiple copies (of different versions) from being installed, it is recommended to install rxjs first before redux-logic. That way you can use the same copy of rxjs elsewhere.

If you are never using rxjs outside of redux-logic and don't plan to use Observables directly in your logic then you can skip the rxjs install and it will be installed as a redux-logic dependency. However if you think you might use Observables directly in the future (possibly creating Observables in your logic), it is still recommended to install rxjs separately first
just to help ensure that only one copy will be in the project.

The rxjs install below `npm install rxjs@^5` installs the lastest 5.x.x version of rxjs.

```bash
npm install rxjs --save
npm install rxjs@^5 --save # optional see note above
npm install redux-logic --save
```

Expand Down
15 changes: 15 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,25 @@

Contents:

- [Installation](#installation)
- [Main usage](#main-usage)
- [Execution phase hooks](#execution-phase-hooks---validate-transform-process) - [validate](#validate-hook), [transform](#transform-hook), [process](#process-hook)
- [Advanced usage](#advanced-usage)

## Installation

redux-logic uses rxjs@5 under the covers and to prevent multiple copies (of different versions) from being installed, it is recommended to install rxjs first before redux-logic. That way you can use the same copy of rxjs elsewhere.

If you are never using rxjs outside of redux-logic and don't plan to use Observables directly in your logic then you can skip the rxjs install and it will be installed as a redux-logic dependency. However if you think you might use Observables directly in the future (possibly creating Observables in your logic), it is still recommended to install rxjs separately first
just to help ensure that only one copy will be in the project.

The rxjs install below `npm install rxjs@^5` installs the lastest 5.x.x version of rxjs.

```bash
npm install rxjs@^5 --save # optional see note above
npm install redux-logic --save
```

## Main usage

```js
Expand Down
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@
"dependencies": {
"is-observable": "^0.2.0",
"is-promise": "^2.1.0",
"loose-envify": "^1.2.0"
"loose-envify": "^1.2.0",
"rxjs": "^5.0.3"
},
"peerDependencies": {
"redux": "^3.5.2",
"rxjs": "^5.0.3"
"redux": "^3.5.2"
},
"devDependencies": {
"babel-cli": "^6.3.15",
Expand Down Expand Up @@ -126,7 +126,6 @@
"nyc": "^8.3.0",
"redux": "^3.5.2",
"rimraf": "^2.3.4",
"rxjs": "^5.0.3",
"webpack": "^1.9.6",
"yarn": "^0.27.5"
},
Expand Down

0 comments on commit ba224af

Please sign in to comment.