redux-thunks
Advanced tools
Comparing version
{ | ||
"name": "redux-thunks", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "Thunk creator for redux", | ||
"main": "src/index.js", | ||
"main": "cjs/index.js", | ||
"module": "src/index.js", | ||
"scripts": { | ||
"lint": "eslint *.js src/**/*.js", | ||
"test": "npm run lint && npm run test:only", | ||
"test:only": "nyc ava", | ||
"build": "rimraf cjs && babel --out-dir cjs --ignore __tests__ src", | ||
"prepublishOnly": "npm run build", | ||
"test": "npm run build && npm run lint && nyc ava", | ||
"test:only": "npm run build && ava", | ||
"test:dev": "ava --watch", | ||
@@ -24,5 +27,19 @@ "report-coverage": "nyc report --reporter=lcov > coverage.lcov && codecov" | ||
"homepage": "https://github.com/w33ble/redux-thunks", | ||
"babel": { | ||
"presets": [ | ||
[ | ||
"env", | ||
{ | ||
"targets": { | ||
"node": 6 | ||
} | ||
} | ||
] | ||
] | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"ava": "^0.21.0", | ||
"babel-cli": "^6.24.1", | ||
"babel-preset-env": "^1.6.0", | ||
"codecov": "^2.2.0", | ||
@@ -34,4 +51,5 @@ "eslint": "^3.19.0", | ||
"eslint-plugin-react": "^7.1.0", | ||
"nyc": "^11.0.3" | ||
"nyc": "^11.0.3", | ||
"rimraf": "^2.6.1" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
exports.createThunk = function createThunk(name, fn) { | ||
export function createThunk(name, fn) { | ||
const actionCreator = (...args) => (dispatch, getState) => fn({ dispatch, getState }, ...args); | ||
@@ -8,2 +8,2 @@ | ||
return actionCreator; | ||
}; | ||
} |
@@ -1,5 +0,1 @@ | ||
const createThunk = require('./create_thunk'); | ||
module.exports = { | ||
createThunk, | ||
}; | ||
export { createThunk } from './create_thunk'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
10
11.11%5812
-11.7%11
37.5%27
-56.45%