Skip to content

Commit

Permalink
feat(package): refactor lodash dependency with babel-plugin-lodash (#51)
Browse files Browse the repository at this point in the history
* chore(package): add "babel-plugin-lodash" to devDependencies

* feat(package): add "lodash" to dependencies

* feat(index): switch to lodash modules under different entry points

* Ref #22

* feat(package): remove "lodash.isplainobject", "lodash.isstring", "lodash.issymbol" from dependencies

* Ref #22
  • Loading branch information
tomchentw authored and JaKXz committed Feb 9, 2017
1 parent 01e8fc3 commit 5eb76c5
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 20 deletions.
1 change: 1 addition & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"presets": ["stage-0", ["es2015", { "loose": true }]],
"plugins": ["lodash"],
"env": {
"test": {
"plugins": ["istanbul"]
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"babel-core": "^6.18.2",
"babel-eslint": "^7.1.1",
"babel-plugin-istanbul": "^4.0.0",
"babel-plugin-lodash": "^3.2.11",
"babel-preset-es2015": "^6.18.0",
"babel-preset-stage-0": "^6.16.0",
"chai": "^3.5.0",
Expand All @@ -53,9 +54,7 @@
"typescript-eslint-parser": "^1.0.2"
},
"dependencies": {
"lodash.isplainobject": "^4.0.6",
"lodash.isstring": "^4.0.1",
"lodash.issymbol": "^4.0.1"
"lodash": "^4.0.0"
},
"nyc": {
"all": true,
Expand Down
8 changes: 5 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import isPlainObject from 'lodash.isplainobject';
import isString from 'lodash.isstring';
import isSymbol from 'lodash.issymbol';
import {
isPlainObject,
isString,
isSymbol,
} from 'lodash';

export function isFSA(action) {
return (
Expand Down
23 changes: 9 additions & 14 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,13 @@ babel-plugin-istanbul@^4.0.0:
istanbul-lib-instrument "^1.4.2"
test-exclude "^4.0.0"

babel-plugin-lodash@^3.2.11:
version "3.2.11"
resolved "https://registry.yarnpkg.com/babel-plugin-lodash/-/babel-plugin-lodash-3.2.11.tgz#21c8fdec9fe1835efaa737873e3902bdd66d5701"
dependencies:
glob "^7.1.1"
lodash "^4.17.2"

babel-plugin-syntax-async-functions@^6.8.0:
version "6.13.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95"
Expand Down Expand Up @@ -1831,7 +1838,7 @@ glob@^5.0.5:
once "^1.3.0"
path-is-absolute "^1.0.0"

glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6:
glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6, glob@^7.1.1:
version "7.1.1"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8"
dependencies:
Expand Down Expand Up @@ -2360,18 +2367,6 @@ lodash.isarray@^3.0.0:
version "3.0.4"
resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55"

lodash.isplainobject@^4.0.6:
version "4.0.6"
resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb"

lodash.isstring@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451"

lodash.issymbol@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/lodash.issymbol/-/lodash.issymbol-4.0.1.tgz#04ad41d96f3f4f399c37dd4fcf3c1b6901e16116"

lodash.keys@^3.0.0:
version "3.1.2"
resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a"
Expand Down Expand Up @@ -2411,7 +2406,7 @@ [email protected]:
dependencies:
lodash.tostring "^4.0.0"

lodash@^4.0.0, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0:
lodash@^4.0.0, lodash@^4.17.2, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0:
version "4.17.4"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"

Expand Down

0 comments on commit 5eb76c5

Please sign in to comment.