Skip to content

Commit d562c69

Browse files
committed
build in both modes
1 parent d764a63 commit d562c69

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
"jest": "jest --env node",
2525
"test": "export $(cat .env) && jest --env node --coverage --collectCoverageFrom=src/*.js --forceExit test/*",
2626
"test-in-browser": "serve . && echo 'Visit http://localhost:5000/samples/browser-app'",
27-
"build": "webpack",
27+
"build_pack": "cross-env BABEL_ENV=production babel src --out-dir lib",
28+
"build_dist": "webpack",
29+
"build": "yarn build_pack; yarn build_dist",
2830
"prepublish": "yarn clean && yarn lint && yarn test && yarn build",
2931
"format_test": "prettier --config test/.prettierrc --write 'test*/*.js'",
3032
"format_ex": "prettier --config .prettierrc --write '*.js'",
@@ -48,5 +50,8 @@
4850
"rimraf": "^2.6.2",
4951
"webpack": "^4.29.6",
5052
"webpack-cli": "^3.3.0"
53+
},
54+
"dependencies": {
55+
"cross-env": "^5.2.0"
5156
}
5257
}

yarn.lock

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1831,6 +1831,14 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4:
18311831
safe-buffer "^5.0.1"
18321832
sha.js "^2.4.8"
18331833

1834+
cross-env@^5.2.0:
1835+
version "5.2.0"
1836+
resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-5.2.0.tgz#6ecd4c015d5773e614039ee529076669b9d126f2"
1837+
integrity sha512-jtdNFfFW1hB7sMhr/H6rW1Z45LFqyI431m3qU6bFXcQ3Eh7LtBuG3h74o7ohHZ3crrRkkqHlo4jYHFPcjroANg==
1838+
dependencies:
1839+
cross-spawn "^6.0.5"
1840+
is-windows "^1.0.0"
1841+
18341842
cross-spawn@^5.0.1, cross-spawn@^5.1.0:
18351843
version "5.1.0"
18361844
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
@@ -3232,7 +3240,7 @@ is-utf8@^0.2.0:
32323240
version "0.2.1"
32333241
resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72"
32343242

3235-
is-windows@^1.0.1, is-windows@^1.0.2:
3243+
is-windows@^1.0.0, is-windows@^1.0.1, is-windows@^1.0.2:
32363244
version "1.0.2"
32373245
resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
32383246

0 commit comments

Comments
 (0)