Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5eb76c5

Browse files
tomchentwJaKXz
authored andcommitted
feat(package): refactor lodash dependency with babel-plugin-lodash (#51)
* 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
1 parent01e8fc3 commit5eb76c5

File tree

4 files changed

+17
-20
lines changed

4 files changed

+17
-20
lines changed

‎.babelrc‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"presets": ["stage-0", ["es2015", {"loose":true }]],
3+
"plugins": ["lodash"],
34
"env": {
45
"test": {
56
"plugins": ["istanbul"]

‎package.json‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"babel-core":"^6.18.2",
3535
"babel-eslint":"^7.1.1",
3636
"babel-plugin-istanbul":"^4.0.0",
37+
"babel-plugin-lodash":"^3.2.11",
3738
"babel-preset-es2015":"^6.18.0",
3839
"babel-preset-stage-0":"^6.16.0",
3940
"chai":"^3.5.0",
@@ -53,9 +54,7 @@
5354
"typescript-eslint-parser":"^1.0.2"
5455
},
5556
"dependencies": {
56-
"lodash.isplainobject":"^4.0.6",
57-
"lodash.isstring":"^4.0.1",
58-
"lodash.issymbol":"^4.0.1"
57+
"lodash":"^4.0.0"
5958
},
6059
"nyc": {
6160
"all":true,

‎src/index.js‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
importisPlainObjectfrom'lodash.isplainobject';
2-
importisStringfrom'lodash.isstring';
3-
importisSymbolfrom'lodash.issymbol';
1+
import{
2+
isPlainObject,
3+
isString,
4+
isSymbol,
5+
}from'lodash';
46

57
exportfunctionisFSA(action){
68
return(

‎yarn.lock‎

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,13 @@ babel-plugin-istanbul@^4.0.0:
383383
istanbul-lib-instrument "^1.4.2"
384384
test-exclude "^4.0.0"
385385

386+
babel-plugin-lodash@^3.2.11:
387+
version "3.2.11"
388+
resolved "https://registry.yarnpkg.com/babel-plugin-lodash/-/babel-plugin-lodash-3.2.11.tgz#21c8fdec9fe1835efaa737873e3902bdd66d5701"
389+
dependencies:
390+
glob "^7.1.1"
391+
lodash "^4.17.2"
392+
386393
babel-plugin-syntax-async-functions@^6.8.0:
387394
version "6.13.0"
388395
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95"
@@ -1831,7 +1838,7 @@ glob@^5.0.5:
18311838
once "^1.3.0"
18321839
path-is-absolute "^1.0.0"
18331840

1834-
glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6:
1841+
glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6, glob@^7.1.1:
18351842
version "7.1.1"
18361843
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8"
18371844
dependencies:
@@ -2360,18 +2367,6 @@ lodash.isarray@^3.0.0:
23602367
version "3.0.4"
23612368
resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55"
23622369

2363-
lodash.isplainobject@^4.0.6:
2364-
version "4.0.6"
2365-
resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb"
2366-
2367-
lodash.isstring@^4.0.1:
2368-
version "4.0.1"
2369-
resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451"
2370-
2371-
lodash.issymbol@^4.0.1:
2372-
version "4.0.1"
2373-
resolved "https://registry.yarnpkg.com/lodash.issymbol/-/lodash.issymbol-4.0.1.tgz#04ad41d96f3f4f399c37dd4fcf3c1b6901e16116"
2374-
23752370
lodash.keys@^3.0.0:
23762371
version "3.1.2"
23772372
resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a"
@@ -2411,7 +2406,7 @@ lodash.unescape@4.0.0:
24112406
dependencies:
24122407
lodash.tostring "^4.0.0"
24132408

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp