Skip to content

Commit 91a86a3

Browse files
toto8514toto8514
authored andcommitted
README.md - coveralls badge
1 parent a56225e commit 91a86a3

File tree

4 files changed

+65
-21
lines changed

4 files changed

+65
-21
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ branches:
88
only:
99
- master
1010
cache: npm
11+
after_success:
12+
- npm run coveralls

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Inspired by [Redux](https://redux.js.org), it reimplements the redux paradigm of
1111
- [CodeSandbox Examples](#codesandbox-examples)
1212
- [License](#license)
1313

14-
[![Build Status](https://travis-ci.org/iusehooks/redhooks.svg?branch=master)](https://travis-ci.org/iusehooks/redhooks) [![Package size](https://img.shields.io/bundlephobia/minzip/redhooks.svg)](https://bundlephobia.com/result?p=redhooks)
14+
[![Build Status](https://travis-ci.org/iusehooks/redhooks.svg?branch=master)](https://travis-ci.org/iusehooks/redhooks) [![Package size](https://img.shields.io/bundlephobia/minzip/redhooks.svg)](https://bundlephobia.com/result?p=redhooks) [![Coverage Status](https://coveralls.io/repos/github/iusehooks/redhooks/badge.svg?branch=master)](https://coveralls.io/github/iusehooks/redhooks?branch=master) ![License](https://img.shields.io/npm/l/redhooks.svg?style=flat) [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Predictable%20state%20container%20for%20React%20apps%20written%20using%20Hooks&url=https://github.com/iusehooks/redhooks&hashtags=reactjs,webdev,javascript)
1515

1616
# Installation
1717
```sh
@@ -217,7 +217,7 @@ export default connect(mapStateToProp)(ReadFromStore);
217217
# Apply Middleware
218218

219219
As for Redux, [middleware](https://redux.js.org/advanced/middleware) is a way to extend Redhooks with custom functionality.
220-
Middleware are functions which receive the store's `dispatch` and `getState` as named arguments, and subsequently return a function. Redhooks supports the use of redux middleware like `[redux-thunk](https://www.npmjs.com/package/redux-thunk)`, `[redux-saga](https://www.npmjs.com/package/redux-saga)` or you could write custom middleware to conform to the middleware API.
220+
Middleware are functions which receive the store's `dispatch` and `getState` as named arguments, and subsequently return a function. Redhooks supports the use of redux middleware like [redux-thunk](https://www.npmjs.com/package/redux-thunk), [redux-saga](https://www.npmjs.com/package/redux-saga) or you could write custom middleware to conform to the middleware API.
221221

222222
## Custom middleware - Logger Example
223223

package-lock.json

Lines changed: 58 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"pretest": "npm run lint",
1414
"test": "cross-env NODE_ENV=test jest -u",
1515
"test:watch": "npm run test -- --watch",
16-
"test:cov": "npm test -- --coverage"
16+
"test:cov": "npm test -- --coverage",
17+
"coveralls": "npm run test:cov && cat ./coverage/lcov.info | coveralls"
1718
},
1819
"author": "Antonio Pangallo (https://github.com/antoniopangallo)",
1920
"files": [
@@ -42,6 +43,7 @@
4243
"babel-core": "^7.0.0-bridge.0",
4344
"babel-eslint": "^10.0.1",
4445
"child_process": "^1.0.2",
46+
"coveralls": "^3.0.2",
4547
"cross-env": "^5.2.0",
4648
"eslint": "^5.11.1",
4749
"eslint-config-prettier": "^3.3.0",

0 commit comments

Comments
 (0)