From 3a7253a9726f4f65acc0164838f226c81ff2ca8f Mon Sep 17 00:00:00 2001 From: Dmitriy Mozgovoy Date: Tue, 5 Jan 2021 01:12:02 +0200 Subject: [PATCH] Refactored package.json; --- README.md | 10 ++++++++++ package.json | 17 ++++++++++++----- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6b16784..f429077 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,16 @@ such as [cp-fetch](https://www.npmjs.com/package/cp-fetch) and [cp-axios](https: you get a powerful tool for building asynchronous logic for your components. You just have to use `generators` instead of an async function to make your code cancellable, but basically, that just means you will have to use `yield` instead of `await` keyword. +## Installation :hammer: +- Install for node.js using npm/yarn: + +```bash +$ npm install use-async-effect2 c-promise2 +``` + +```bash +$ yarn add use-async-effect2 c-promise2 +``` ## Usage example Minimal example with json request [Live demo](https://codesandbox.io/s/friendly-murdock-wxq8u?file=/src/App.js) ````jsx diff --git a/package.json b/package.json index 74594c8..5de106b 100644 --- a/package.json +++ b/package.json @@ -62,11 +62,15 @@ "pause", "task" ], + "repository": "https://github.com/DigitalBrainJS/use-async-effect.git", + "bugs": { + "url": "https://github.com/DigitalBrainJS/use-async-effect/issues" + }, "dependencies": { - "browser-sync": "^2.26.13", - "c-promise2": "^0.10.8", - "react": "^17.0.1", - "react-dom": "^17.0.1" + }, + "peerDependencies": { + "react": ">=16.8.0", + "c-promise2": ">=0.10.8" }, "devDependencies": { "@babel/core": "^7.12.10", @@ -76,6 +80,7 @@ "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-node-resolve": "^11.0.1", "@rollup/plugin-replace": "^2.3.4", + "browser-sync": "^2.26.13", "assert": "^2.0.0", "chai": "^4.2.0", "concurrently": "^5.3.0", @@ -86,6 +91,8 @@ "nodemon": "^2.0.6", "prop-types": "^15.7.2", "react-is": "^17.0.1", - "rollup": "^2.35.1" + "rollup": "^2.35.1", + "react": "^17.0.1", + "react-dom": "^17.0.1" } }