Skip to content

Commit

Permalink
use env-cmd replace cross-env
Browse files Browse the repository at this point in the history
  • Loading branch information
septs authored and Jack-Works committed Feb 19, 2020
1 parent 52e91a8 commit 0c6b3c8
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 34 deletions.
11 changes: 11 additions & 0 deletions .env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"production": {
"NODE_ENV": "production"
},
"development": {
"NODE_ENV": "development"
},
"test": {
"TS_NODE_COMPILER_OPTIONS": "{\"module\":\"commonjs\"}"
}
}
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
},
"sideEffects": false,
"scripts": {
"start": "cross-env NODE_ENV=development npm-run-all --parallel \"start:tsc -- {@}\" start:rollup",
"start": "env-cmd -e development npm-run-all --parallel \"start:tsc -- {@}\" start:rollup",
"start:tsc": "tsc --watch",
"start:rollup": "rollup -c -w",
"build": "cross-env NODE_ENV=production npm-run-all --parallel clean \"build:tsc -- {@}\" build:rollup",
"build": "env-cmd -e production npm-run-all --parallel clean \"build:tsc -- {@}\" build:rollup",
"build:tsc": "tsc",
"build:rollup": "rollup -c -m",
"eslint": "eslint . --ext .ts,.tsx",
Expand All @@ -31,7 +31,7 @@
"doc": "npm-run-all --serial build:tsc doc:api doc:md",
"doc:api": "api-extractor run --local --verbose",
"doc:md": "api-documenter markdown -i temp -o api-documents",
"test": "cross-env TS_NODE_COMPILER_OPTIONS='{ \"module\": \"commonjs\" }' mocha -r ts-node/register/transpile-only -r source-map-support/register -r jsdom-global/register --recursive src/**/*.spec.ts"
"test": "env-cmd -e test mocha -r ts-node/register/transpile-only -r source-map-support/register -r jsdom-global/register --recursive src/**/*.spec.ts"
},
"devDependencies": {
"@microsoft/api-documenter": "^7.7.12",
Expand All @@ -41,7 +41,7 @@
"@types/mocha": "^7.0.1",
"@typescript-eslint/eslint-plugin": "^2.19.0",
"@typescript-eslint/parser": "^2.19.0",
"cross-env": "^7.0.0",
"env-cmd": "^10.1.0",
"eslint": "^6.8.0",
"eslint-watch": "^6.0.1",
"jsdom": "^16.1.0",
Expand Down
44 changes: 14 additions & 30 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,6 @@
regexpp "^3.0.0"
tsutils "^3.17.1"

"@typescript-eslint/[email protected]":
version "2.19.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.19.0.tgz#d5ca732f22c009e515ba09fcceb5f2127d841568"
integrity sha512-zwpg6zEOPbhB3+GaQfufzlMUOO6GXCNZq6skk+b2ZkZAIoBhVoanWK255BS1g5x9bMwHpLhX0Rpn5Fc3NdCZdg==
dependencies:
"@types/json-schema" "^7.0.3"
"@typescript-eslint/typescript-estree" "2.19.0"
eslint-scope "^5.0.0"

"@typescript-eslint/[email protected]":
version "2.19.2"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.19.2.tgz#4611d44cf0f0cb460c26aa7676fc0a787281e233"
Expand All @@ -196,19 +187,6 @@
"@typescript-eslint/typescript-estree" "2.19.2"
eslint-visitor-keys "^1.1.0"

"@typescript-eslint/[email protected]":
version "2.19.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.19.0.tgz#6bd7310b9827e04756fe712909f26956aac4b196"
integrity sha512-n6/Xa37k0jQdwpUszffi19AlNbVCR0sdvCs3DmSKMD7wBttKY31lhD2fug5kMD91B2qW4mQldaTEc1PEzvGu8w==
dependencies:
debug "^4.1.1"
eslint-visitor-keys "^1.1.0"
glob "^7.1.6"
is-glob "^4.0.1"
lodash "^4.17.15"
semver "^6.3.0"
tsutils "^3.17.1"

"@typescript-eslint/[email protected]":
version "2.19.2"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.19.2.tgz#67485b00172f400474d243c6c0be27581a579350"
Expand Down Expand Up @@ -527,6 +505,11 @@ commander@^2.7.1:
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422"
integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==

commander@^4.0.0:
version "4.1.1"
resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068"
integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==

commondir@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"
Expand Down Expand Up @@ -554,13 +537,6 @@ [email protected]:
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=

cross-env@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.0.tgz#5a3b2ddce51ec713ea58f2fb79ce22e65b4f5479"
integrity sha512-rV6M9ldNgmwP7bx5u6rZsTbYidzwvrwIYZnT08hSGLcQCcggofgFW+sNe7IhA1SRauPS0QuLbbX+wdNtpqE5CQ==
dependencies:
cross-spawn "^7.0.1"

cross-spawn@^6.0.5:
version "6.0.5"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
Expand All @@ -572,7 +548,7 @@ cross-spawn@^6.0.5:
shebang-command "^1.2.0"
which "^1.2.9"

cross-spawn@^7.0.0, cross-spawn@^7.0.1:
cross-spawn@^7.0.0:
version "7.0.1"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.1.tgz#0ab56286e0f7c24e153d04cc2aa027e43a9a5d14"
integrity sha512-u7v4o84SwFpD32Z8IIcPZ6z1/ie24O6RU3RbtL5Y316l3KuHVPx9ItBgWQ6VlfAFnRnTtMUrsQ9MUUTuEZjogg==
Expand Down Expand Up @@ -709,6 +685,14 @@ end-of-stream@^1.1.0:
dependencies:
once "^1.4.0"

env-cmd@^10.1.0:
version "10.1.0"
resolved "https://registry.yarnpkg.com/env-cmd/-/env-cmd-10.1.0.tgz#c7f5d3b550c9519f137fdac4dd8fb6866a8c8c4b"
integrity sha512-mMdWTT9XKN7yNth/6N6g2GuKuJTsKMDHlQFUDacb/heQRRWOTIZ42t1rMHnQu4jYxU1ajdTeJM+9eEETlqToMA==
dependencies:
commander "^4.0.0"
cross-spawn "^7.0.0"

error-ex@^1.3.1:
version "1.3.2"
resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf"
Expand Down

0 comments on commit 0c6b3c8

Please sign in to comment.