-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Matthieu Beteille
committed
Oct 20, 2017
1 parent
23ce741
commit 241b461
Showing
4 changed files
with
23 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,9 @@ | |
"main": "dist/redux-data-fx.umd.js", | ||
"module": "dist/redux-data-fx.es5.js", | ||
"typings": "dist/types/redux-data-fx.d.ts", | ||
"files": ["dist"], | ||
"files": [ | ||
"dist" | ||
], | ||
"author": "Matthieu Béteille <[email protected]>", | ||
"repository": { | ||
"type": "git", | ||
|
@@ -19,17 +21,15 @@ | |
"scripts": { | ||
"lint": "tslint -t codeFrame 'src/**/*.ts' 'test/**/*.ts'", | ||
"prebuild": "rimraf dist", | ||
"build": | ||
"tsc && rollup -c rollup.config.ts && rimraf compiled && typedoc --out dist/docs --target es6 --theme minimal src", | ||
"build": "tsc && rollup -c rollup.config.ts && rimraf compiled && typedoc --out dist/docs --target es6 --theme minimal src", | ||
"start": "tsc -w & rollup -c rollup.config.ts -w", | ||
"test": "jest", | ||
"test:watch": "jest --watch", | ||
"test:prod": "npm run lint && npm run test -- --coverage --no-cache", | ||
"deploy-docs": "ts-node tools/gh-pages-publish", | ||
"report-coverage": "cat ./coverage/lcov.info | coveralls", | ||
"commit": "git-cz", | ||
"semantic-release": | ||
"semantic-release pre && npm publish && semantic-release post", | ||
"semantic-release": "semantic-release pre && npm publish && semantic-release post", | ||
"semantic-release-prepare": "ts-node tools/semantic-release-prepare", | ||
"precommit": "lint-staged", | ||
"prepush": "npm run test:prod && npm run build", | ||
|
@@ -47,17 +47,23 @@ | |
}, | ||
"validate-commit-msg": { | ||
"types": "conventional-commit-types", | ||
"helpMessage": | ||
"Use \"npm run commit\" instead, we use conventional-changelog format :) (https://github.com/commitizen/cz-cli)" | ||
"helpMessage": "Use \"npm run commit\" instead, we use conventional-changelog format :) (https://github.com/commitizen/cz-cli)" | ||
} | ||
}, | ||
"jest": { | ||
"transform": { | ||
".(ts|tsx)": "<rootDir>/node_modules/ts-jest/preprocessor.js" | ||
}, | ||
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$", | ||
"moduleFileExtensions": ["ts", "tsx", "js"], | ||
"coveragePathIgnorePatterns": ["/node_modules/", "/test/"], | ||
"moduleFileExtensions": [ | ||
"ts", | ||
"tsx", | ||
"js" | ||
], | ||
"coveragePathIgnorePatterns": [ | ||
"/node_modules/", | ||
"/test/" | ||
], | ||
"coverageThreshold": { | ||
"global": { | ||
"branches": 80, | ||
|
@@ -101,7 +107,8 @@ | |
"redux": "^3.7.2" | ||
}, | ||
"dependencies": { | ||
"@types/lodash.foreach": "^4.5.3", | ||
"babel-polyfill": "^6.26.0", | ||
"lodash": "^4.17.4" | ||
"lodash.foreach": "^4.5.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
import { isObject } from 'lodash' | ||
|
||
export interface StateWithFx { | ||
[key: string]: any | ||
state: any | ||
_fx: { [key: string]: any } | ||
} | ||
|
||
export function hasFX(s: any): s is StateWithFx { | ||
return s && isObject(s._fx) && '_fx' in s && 'state' in s | ||
return s && typeof s._fx === 'object' && '_fx' in s && 'state' in s | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters