Skip to content

Commit e6dbdee

Browse files
nowellstimche
authored andcommitted
Use ES5 compatible camelcase library. (#309)
* Use ES5 compatible camelcase library. * Remove devtool. Can remove all of es-check if no automated tests are wanted for now.
1 parent 3bc36a2 commit e6dbdee

File tree

3 files changed

+212
-19
lines changed

3 files changed

+212
-19
lines changed

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"build:es": "cross-env BABEL_ENV=es babel src --out-dir es",
1414
"build:commonjs": "cross-env BABEL_ENV=commonjs babel src --out-dir lib",
1515
"build:umd": "cross-env NODE_ENV=development webpack",
16-
"build:umd:min": "cross-env NODE_ENV=production webpack",
16+
"build:umd:min": "cross-env NODE_ENV=production webpack && es-check es5 dist/redux-actions.min.js",
1717
"build": "run-s clean && run-p build:**",
1818
"clean": "rimraf coverage dist es lib",
1919
"lint": "xo",
@@ -49,6 +49,7 @@
4949
"babel-plugin-transform-object-rest-spread": "^6.26.0",
5050
"babel-preset-env": "^1.6.1",
5151
"cross-env": "^2.0.0",
52+
"es-check": "^2.0.4",
5253
"eslint-config-jest-files": "^0.1.1",
5354
"eslint-config-unicorn-camelcase": "^0.1.1",
5455
"eslint-plugin-prettier": "^2.6.0",
@@ -64,11 +65,11 @@
6465
"xo": "^0.20.3"
6566
},
6667
"dependencies": {
67-
"camelcase": "^5.0.0",
6868
"invariant": "^2.2.1",
6969
"is-function": "^1.0.1",
7070
"is-plain-object": "^2.0.4",
7171
"is-symbol": "^1.0.1",
72+
"lodash.camelcase": "^4.3.0",
7273
"lodash.curry": "^4.1.1",
7374
"reduce-reducers": "^0.1.0"
7475
},

src/utils/camelCase.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import camelCase from 'camelcase';
1+
import camelCase from 'lodash.camelcase';
22

33
const namespacer = '/';
44

@@ -7,5 +7,5 @@ export default type =>
77
? camelCase(type)
88
: type
99
.split(namespacer)
10-
.map(camelCase)
10+
.map(part => camelCase(part))
1111
.join(namespacer);

0 commit comments

Comments
 (0)