Skip to content

Commit

Permalink
Fixed prepublishOnly script;
Browse files Browse the repository at this point in the history
  • Loading branch information
DigitalBrainJS committed Sep 9, 2020
1 parent 0ad47fe commit d1156b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ A font-end example of wrapping fetch to the CPromise and handling cancellation u
fetch(url, {signal}).then(resolve, reject);
})
}
// url with 5s delay for response
// URL with 5 seconds delay to respond
const chain= cancelableFetch('https://run.mocky.io/v3/753aa609-65ae-4109-8f83-9cfe365290f0?mocky-delay=5s')
.then(console.log, console.warn);

setTimeout(()=> chain.cancel(), 1000);
````

Handling cancellation with `onCancel` listeners (see the live demo in the git repo):
Handling cancellation with `onCancel` listeners (see the [live demo](https://runkit.com/digitalbrainjs/runkit-npm-c-promise2)):
````javascript
import CPromise from "c-promise";

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"test:coverage": "nyc --check-coverage npm run test",
"coverage:report": "nyc report --reporter=html --reporter=text",
"coveralls": "nyc report --reporter=text-lcov | coveralls",
"prepublishOnly": "npm run test:coverage && npm run docs",
"prepublishOnly": "npm run build && npm run test:coverage && npm run docs",
"postversion": "git push && git push --tags",
"build": "rollup -c",
"build:watch": "nodemon --watch lib/ --exec \\\"npm run build\\\"",
Expand Down

0 comments on commit d1156b9

Please sign in to comment.