Skip to content

Commit 3a7253a

Browse files
Refactored package.json;
1 parent a0d6894 commit 3a7253a

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

README.md

+10
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@ such as [cp-fetch](https://www.npmjs.com/package/cp-fetch) and [cp-axios](https:
1919
you get a powerful tool for building asynchronous logic for your components.
2020
You just have to use `generators` instead of an async function to make your code cancellable,
2121
but basically, that just means you will have to use `yield` instead of `await` keyword.
22+
## Installation :hammer:
23+
- Install for node.js using npm/yarn:
24+
25+
```bash
26+
$ npm install use-async-effect2 c-promise2
27+
```
28+
29+
```bash
30+
$ yarn add use-async-effect2 c-promise2
31+
```
2232
## Usage example
2333
Minimal example with json request [Live demo](https://codesandbox.io/s/friendly-murdock-wxq8u?file=/src/App.js)
2434
````jsx

package.json

+12-5
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,15 @@
6262
"pause",
6363
"task"
6464
],
65+
"repository": "https://github.com/DigitalBrainJS/use-async-effect.git",
66+
"bugs": {
67+
"url": "https://github.com/DigitalBrainJS/use-async-effect/issues"
68+
},
6569
"dependencies": {
66-
"browser-sync": "^2.26.13",
67-
"c-promise2": "^0.10.8",
68-
"react": "^17.0.1",
69-
"react-dom": "^17.0.1"
70+
},
71+
"peerDependencies": {
72+
"react": ">=16.8.0",
73+
"c-promise2": ">=0.10.8"
7074
},
7175
"devDependencies": {
7276
"@babel/core": "^7.12.10",
@@ -76,6 +80,7 @@
7680
"@rollup/plugin-json": "^4.1.0",
7781
"@rollup/plugin-node-resolve": "^11.0.1",
7882
"@rollup/plugin-replace": "^2.3.4",
83+
"browser-sync": "^2.26.13",
7984
"assert": "^2.0.0",
8085
"chai": "^4.2.0",
8186
"concurrently": "^5.3.0",
@@ -86,6 +91,8 @@
8691
"nodemon": "^2.0.6",
8792
"prop-types": "^15.7.2",
8893
"react-is": "^17.0.1",
89-
"rollup": "^2.35.1"
94+
"rollup": "^2.35.1",
95+
"react": "^17.0.1",
96+
"react-dom": "^17.0.1"
9097
}
9198
}

0 commit comments

Comments
 (0)