Skip to content

Commit cb116d8

Browse files
committed
build(package.json): use cross-env
1 parent addab3e commit cb116d8

File tree

2 files changed

+17
-40
lines changed

2 files changed

+17
-40
lines changed

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
"flow:coverage": "for file in src/**.js test/**.js; do echo $file; flow coverage $file; done",
1717
"flow:watch": "flow-watch -e js,js.flow,flowconfig --ignore es/ --ignore node_modules/ --watch .flowconfig --watch src/ --watch test/",
1818
"clean": "rimraf es lib $(cd src; ls) *.js.flow",
19-
"build": "npm run clean && babel src --out-dir es && flow-copy-source -v src/ es && BABEL_ENV=es5 babel src --out-dir . && flow-copy-source -v src/ .",
20-
"test": "NODE_ENV=production BABEL_ENV=es5 mocha $npm_package_config_mocha && NODE_ENV=production BABEL_ENV=coverage nyc --reporter=lcov --reporter=text mocha $npm_package_config_mocha",
21-
"test:watch": "NODE_ENV=production BABEL_ENV=test mocha --watch $npm_package_config_mocha",
22-
"test:debug": "NODE_ENV=production BABEL_ENV=test mocha --inspect-brk $npm_package_config_mocha",
19+
"build": "npm run clean && babel src --out-dir es && flow-copy-source -v src/ es && cross-env BABEL_ENV=es5 babel src --out-dir . && flow-copy-source -v src/ .",
20+
"test": "cross-env NODE_ENV=production BABEL_ENV=es5 mocha $npm_package_config_mocha && cross-env NODE_ENV=production BABEL_ENV=coverage nyc --reporter=lcov --reporter=text mocha $npm_package_config_mocha",
21+
"test:watch": "cross-env NODE_ENV=production BABEL_ENV=test mocha --watch $npm_package_config_mocha",
22+
"test:debug": "cross-env NODE_ENV=production BABEL_ENV=test mocha --inspect-brk $npm_package_config_mocha",
2323
"codecov": "nyc report --reporter=text-lcov > coverage.lcov; codecov",
2424
"prepublishOnly": "npm run clean && npm run prettier:check && npm run lint && flow && npm test && npm run build",
2525
"open:coverage": "open coverage/lcov-report/index.html",
@@ -90,6 +90,7 @@
9090
"chai": "^4.2.0",
9191
"codecov": "^3.1.0",
9292
"copy": "^0.3.2",
93+
"cross-env": "^5.2.0",
9394
"eslint": "^5.9.0",
9495
"eslint-config-prettier": "^3.3.0",
9596
"eslint-plugin-flowtype": "^3.2.0",

yarn.lock

Lines changed: 12 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2181,6 +2181,14 @@ create-error-class@^3.0.0:
21812181
dependencies:
21822182
capture-stack-trace "^1.0.0"
21832183

2184+
cross-env@^5.2.0:
2185+
version "5.2.0"
2186+
resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-5.2.0.tgz#6ecd4c015d5773e614039ee529076669b9d126f2"
2187+
integrity sha512-jtdNFfFW1hB7sMhr/H6rW1Z45LFqyI431m3qU6bFXcQ3Eh7LtBuG3h74o7ohHZ3crrRkkqHlo4jYHFPcjroANg==
2188+
dependencies:
2189+
cross-spawn "^6.0.5"
2190+
is-windows "^1.0.0"
2191+
21842192
cross-spawn@^4:
21852193
version "4.0.2"
21862194
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41"
@@ -2283,7 +2291,7 @@ debug@^4.0.0, debug@^4.0.1, debug@^4.1.0:
22832291
dependencies:
22842292
ms "^2.1.1"
22852293

2286-
debuglog@*, debuglog@^1.0.1:
2294+
debuglog@^1.0.1:
22872295
version "1.0.1"
22882296
resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492"
22892297
integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI=
@@ -3787,7 +3795,7 @@ import-lazy@^2.1.0:
37873795
resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43"
37883796
integrity sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=
37893797

3790-
imurmurhash@*, imurmurhash@^0.1.4:
3798+
imurmurhash@^0.1.4:
37913799
version "0.1.4"
37923800
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
37933801
integrity sha1-khi5srkoojixPcT7a21XbyMUU+o=
@@ -4194,7 +4202,7 @@ is-windows@^0.2.0:
41944202
resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-0.2.0.tgz#de1aa6d63ea29dd248737b69f1ff8b8002d2108c"
41954203
integrity sha1-3hqm1j6indJIc3tp8f+LgALSEIw=
41964204

4197-
is-windows@^1.0.2:
4205+
is-windows@^1.0.0, is-windows@^1.0.2:
41984206
version "1.0.2"
41994207
resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
42004208
integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==
@@ -4687,11 +4695,6 @@ lockfile@^1.0.4:
46874695
dependencies:
46884696
signal-exit "^3.0.2"
46894697

4690-
lodash._baseindexof@*:
4691-
version "3.1.0"
4692-
resolved "https://registry.yarnpkg.com/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c"
4693-
integrity sha1-/lK1OhxnYeQmGNZU5KJXie1hgiw=
4694-
46954698
lodash._baseuniq@~4.6.0:
46964699
version "4.6.0"
46974700
resolved "https://registry.yarnpkg.com/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz#0ebb44e456814af7905c6212fa2c9b2d51b841e8"
@@ -4700,33 +4703,11 @@ lodash._baseuniq@~4.6.0:
47004703
lodash._createset "~4.0.0"
47014704
lodash._root "~3.0.0"
47024705

4703-
lodash._bindcallback@*:
4704-
version "3.0.1"
4705-
resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e"
4706-
integrity sha1-5THCdkTPi1epnhftlbNcdIeJOS4=
4707-
4708-
lodash._cacheindexof@*:
4709-
version "3.0.2"
4710-
resolved "https://registry.yarnpkg.com/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz#3dc69ac82498d2ee5e3ce56091bafd2adc7bde92"
4711-
integrity sha1-PcaayCSY0u5ePOVgkbr9Ktx73pI=
4712-
4713-
lodash._createcache@*:
4714-
version "3.1.2"
4715-
resolved "https://registry.yarnpkg.com/lodash._createcache/-/lodash._createcache-3.1.2.tgz#56d6a064017625e79ebca6b8018e17440bdcf093"
4716-
integrity sha1-VtagZAF2JeeevKa4AY4XRAvc8JM=
4717-
dependencies:
4718-
lodash._getnative "^3.0.0"
4719-
47204706
lodash._createset@~4.0.0:
47214707
version "4.0.3"
47224708
resolved "https://registry.yarnpkg.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26"
47234709
integrity sha1-D0ZZ+7CddRlPqeK4imZE02PJ/iY=
47244710

4725-
lodash._getnative@*, lodash._getnative@^3.0.0:
4726-
version "3.9.1"
4727-
resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5"
4728-
integrity sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=
4729-
47304711
lodash._reinterpolate@~3.0.0:
47314712
version "3.0.0"
47324713
resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
@@ -4807,11 +4788,6 @@ lodash.pick@4.4.0:
48074788
resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3"
48084789
integrity sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=
48094790

4810-
lodash.restparam@*:
4811-
version "3.6.1"
4812-
resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805"
4813-
integrity sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=
4814-
48154791
lodash.snakecase@4.1.1:
48164792
version "4.1.1"
48174793
resolved "https://registry.yarnpkg.com/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz#39d714a35357147837aefd64b5dcbb16becd8f8d"
@@ -6554,7 +6530,7 @@ readable-stream@~1.1.10:
65546530
isarray "0.0.1"
65556531
string_decoder "~0.10.x"
65566532

6557-
readdir-scoped-modules@*, readdir-scoped-modules@^1.0.0:
6533+
readdir-scoped-modules@^1.0.0:
65586534
version "1.0.2"
65596535
resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz#9fafa37d286be5d92cbaebdee030dc9b5f406747"
65606536
integrity sha1-n6+jfShr5dksuuve4DDcm19AZ0c=

0 commit comments

Comments
 (0)