Skip to content

Commit

Permalink
replace babel resolve plugin for specificity
Browse files Browse the repository at this point in the history
adds back in the native dependencies for CLI tools outside electron and adds resolves for tests so electron gets build-for-electron versions
  • Loading branch information
krystophv committed Aug 10, 2017
1 parent 2ae3731 commit a9e2f36
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 4 deletions.
8 changes: 7 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@
},
"test": {
"plugins": [
["resolver", { "resolveDirs": [ "app/node_modules" ]}],
[ "module-resolver", {
"root": ["./app/node_modules"],
"alias": {
"node-hid": "./app/node_modules/node-hid",
"serialport": "./app/node_modules/serialport"
}
} ],
["webpack-loaders", { "config": "webpack.config.test.js", "verbose": false }],
"babel-plugin-rewire",
["transform-define", {
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
"babel-loader": "6.4.1",
"babel-plugin-add-module-exports": "0.2.1",
"babel-plugin-dev-expression": "0.2.1",
"babel-plugin-resolver": "1.1.0",
"babel-plugin-module-resolver": "2.7.1",
"babel-plugin-rewire": "1.1.0",
"babel-plugin-transform-class-properties": "6.24.1",
"babel-plugin-transform-define": "1.2.0",
Expand Down Expand Up @@ -213,6 +213,7 @@
"minimist": "1.2.0",
"mocha": "3.2.0",
"nodegit": "0.18.3",
"node-hid": "0.5.4",
"object-invariant-test-helper": "0.1.1",
"open": "0.0.5",
"proxyquire": "1.7.11",
Expand All @@ -221,6 +222,7 @@
"redux-logger": "3.0.1",
"redux-mock-store": "1.2.3",
"salinity": "0.0.8",
"serialport": "4.0.7",
"shelljs": "0.7.8",
"sinon": "2.1.0",
"sinon-chai": "2.9.0",
Expand Down
33 changes: 31 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,14 @@ babel-plugin-minify-type-constructors@^0.0.4:
dependencies:
babel-helper-is-void-0 "^0.0.1"

[email protected]:
version "2.7.1"
resolved "https://registry.yarnpkg.com/babel-plugin-module-resolver/-/babel-plugin-module-resolver-2.7.1.tgz#18be3c42ddf59f7a456c9e0512cd91394f6e4be1"
dependencies:
find-babel-config "^1.0.1"
glob "^7.1.1"
resolve "^1.2.0"

babel-plugin-react-transform@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/babel-plugin-react-transform/-/babel-plugin-react-transform-2.0.2.tgz#515bbfa996893981142d90b1f9b1635de2995109"
Expand Down Expand Up @@ -3704,6 +3712,13 @@ finalhandler@~1.0.0:
statuses "~1.3.1"
unpipe "~1.0.0"

find-babel-config@^1.0.1:
version "1.1.0"
resolved "https://registry.yarnpkg.com/find-babel-config/-/find-babel-config-1.1.0.tgz#acc01043a6749fec34429be6b64f542ebb5d6355"
dependencies:
json5 "^0.5.1"
path-exists "^3.0.0"

find-cache-dir@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-0.1.1.tgz#c8defae57c8a52a8a784f9e31c57c742e993a0b9"
Expand Down Expand Up @@ -5847,7 +5862,7 @@ mz@^2.3.1:
object-assign "^4.0.1"
thenify-all "^1.0.0"

nan@^2.2.0, nan@^2.3.0:
nan@^2.2.0, nan@^2.3.0, nan@^2.4.0:
version "2.6.2"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45"

Expand Down Expand Up @@ -5996,7 +6011,21 @@ node-libs-browser@^1.0.0:
util "^0.10.3"
vm-browserify "0.0.4"

node-pre-gyp@^0.6.36, node-pre-gyp@~0.6.32:
[email protected]:
version "0.6.31"
resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.31.tgz#d8a00ddaa301a940615dbcc8caad4024d58f6017"
dependencies:
mkdirp "~0.5.1"
nopt "~3.0.6"
npmlog "^4.0.0"
rc "~1.1.6"
request "^2.75.0"
rimraf "~2.5.4"
semver "~5.3.0"
tar "~2.2.1"
tar-pack "~3.3.0"

node-pre-gyp@^0.6.32, node-pre-gyp@^0.6.36, node-pre-gyp@~0.6.32:
version "0.6.36"
resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.36.tgz#db604112cb74e0d477554e9b505b17abddfab786"
dependencies:
Expand Down

0 comments on commit a9e2f36

Please sign in to comment.