Skip to content
This repository was archived by the owner on Sep 7, 2020. It is now read-only.

Commit c763a14

Browse files
committed
better bs-platform lib trick (cross-platform)
rescript-lang/rescript#2127
1 parent 94ae4f7 commit c763a14

File tree

3 files changed

+56
-2
lines changed

3 files changed

+56
-2
lines changed

packages/bs-platform/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
],
1717
"devDependencies": {
1818
"bs-platform": "^4.0.0",
19-
"cpy-cli": "^2.0.0"
19+
"cpy-cli": "^2.0.0",
20+
"replace": "^1.0.0"
2021
},
2122
"scripts": {
2223
"prepare": "cpy \"../../node_modules/bs-platform/lib/js/*.js\" lib/js && cpy \"../../node_modules/bs-platform/lib/es6/*.js\" lib/es6"

packages/bs-platform/tweak

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
#!/usr/bin/env bash
22

3-
sed -i '' -e 's/require("bs-platform\/lib/require("@phenomic\/bs-platform\/lib/g' $1
3+
# sed is not cross platform...
4+
#sed -i '' -e 's/require("bs-platform\/lib/require("@phenomic\/bs-platform\/lib/g' $1
5+
../../../bs-platform/node_modules/.bin/replace 'require\("bs-platform\/lib' 'require("@phenomic/bs-platform/lib' "$1"

yarn.lock

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2071,6 +2071,11 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1:
20712071
dependencies:
20722072
color-convert "^1.9.0"
20732073

2074+
ansi-styles@~1.0.0:
2075+
version "1.0.0"
2076+
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-1.0.0.tgz#cb102df1c56f5123eab8b67cd7b98027a0279178"
2077+
integrity sha1-yxAt8cVvUSPquLZ817mAJ6AnkXg=
2078+
20742079
any-promise@^1.0.0:
20752080
version "1.3.0"
20762081
resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f"
@@ -3145,6 +3150,15 @@ [email protected], chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.1, chalk@^2.4.
31453150
escape-string-regexp "^1.0.5"
31463151
supports-color "^5.3.0"
31473152

3153+
chalk@~0.4.0:
3154+
version "0.4.0"
3155+
resolved "https://registry.yarnpkg.com/chalk/-/chalk-0.4.0.tgz#5199a3ddcd0c1efe23bc08c1b027b06176e0c64f"
3156+
integrity sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=
3157+
dependencies:
3158+
ansi-styles "~1.0.0"
3159+
has-color "~0.1.0"
3160+
strip-ansi "~0.1.0"
3161+
31483162
character-entities-html4@^1.0.0:
31493163
version "1.1.2"
31503164
resolved "https://registry.yarnpkg.com/character-entities-html4/-/character-entities-html4-1.1.2.tgz#c44fdde3ce66b52e8d321d6c1bf46101f0150610"
@@ -3393,6 +3407,11 @@ [email protected]:
33933407
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
33943408
integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=
33953409

3410+
3411+
version "1.2.4"
3412+
resolved "https://registry.yarnpkg.com/colors/-/colors-1.2.4.tgz#e0cb41d3e4b20806b3bfc27f4559f01b94bc2f7c"
3413+
integrity sha512-6Y+iBnWmXL+AWtlOp2Vr6R2w5MUlNJRwR0ShVFaAb1CqWzhPOpQg4L0jxD+xpw/Nc8QJwaq3KM79QUCriY8CWQ==
3414+
33963415
colors@~1.1.2:
33973416
version "1.1.2"
33983417
resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63"
@@ -6120,6 +6139,11 @@ [email protected]:
61206139
dependencies:
61216140
isarray "0.0.1"
61226141

6142+
has-color@~0.1.0:
6143+
version "0.1.7"
6144+
resolved "https://registry.yarnpkg.com/has-color/-/has-color-0.1.7.tgz#67144a5260c34fc3cca677d041daf52fe7b78b2f"
6145+
integrity sha1-ZxRKUmDDT8PMpnfQQdr1L+e3iy8=
6146+
61236147
61246148
version "1.1.0"
61256149
resolved "https://registry.yarnpkg.com/has-cors/-/has-cors-1.1.0.tgz#5e474793f7ea9843d1bb99c23eef49ff126fff39"
@@ -8907,6 +8931,14 @@ [email protected]:
89078931
resolved "https://registry.yarnpkg.com/node-version/-/node-version-1.1.3.tgz#1081c87cce6d2dbbd61d0e51e28c287782678496"
89088932
integrity sha512-rEwE51JWn0yN3Wl5BXeGn5d52OGbSXzWiiXRjAQeuyvcGKyvuSILW2rb3G7Xh+nexzLwhTpek6Ehxd6IjvHePg==
89098933

8934+
8935+
version "1.8.1"
8936+
resolved "https://registry.yarnpkg.com/nomnom/-/nomnom-1.8.1.tgz#2151f722472ba79e50a76fc125bb8c8f2e4dc2a7"
8937+
integrity sha1-IVH3Ikcrp55Qp2/BJbuMjy5Nwqc=
8938+
dependencies:
8939+
chalk "~0.4.0"
8940+
underscore "~1.6.0"
8941+
89108942
"nopt@2 || 3":
89118943
version "3.0.6"
89128944
resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9"
@@ -10750,6 +10782,15 @@ [email protected]:
1075010782
resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb"
1075110783
integrity sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=
1075210784

10785+
replace@^1.0.0:
10786+
version "1.0.0"
10787+
resolved "https://registry.yarnpkg.com/replace/-/replace-1.0.0.tgz#da5235cc6d64d5c3a74e4ef73b487aad0f79a74b"
10788+
integrity sha512-5qUu+E1YMF9AMeVEoXa9VjEEgHk7cRNs3GWAN3Z1mt0ugwUxFuuXkDuoOS3nuvN9gH4KR/8Bd2R/Q944ofGtuA==
10789+
dependencies:
10790+
colors "1.2.4"
10791+
minimatch "3.0.4"
10792+
nomnom "1.8.1"
10793+
1075310794
1075410795
version "1.1.1"
1075510796
resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.1.tgz#3eee00b2c5aa83239cfb04c5700da36f81cd08b6"
@@ -11713,6 +11754,11 @@ strip-ansi@^4.0.0:
1171311754
dependencies:
1171411755
ansi-regex "^3.0.0"
1171511756

11757+
strip-ansi@~0.1.0:
11758+
version "0.1.1"
11759+
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-0.1.1.tgz#39e8a98d044d150660abe4a6808acf70bb7bc991"
11760+
integrity sha1-OeipjQRNFQZgq+SmgIrPcLt7yZE=
11761+
1171611762
strip-bom-string@^1.0.0:
1171711763
version "1.0.0"
1171811764
resolved "https://registry.yarnpkg.com/strip-bom-string/-/strip-bom-string-1.0.0.tgz#e5211e9224369fbb81d633a2f00044dc8cedad92"
@@ -12300,6 +12346,11 @@ [email protected], underscore-plus@^1, underscore-plus@^1.5.1:
1230012346
dependencies:
1230112347
underscore "~1.8.3"
1230212348

12349+
underscore@~1.6.0:
12350+
version "1.6.0"
12351+
resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.6.0.tgz#8b38b10cacdef63337b8b24e4ff86d45aea529a8"
12352+
integrity sha1-izixDKze9jM3uLJOT/htRa6lKag=
12353+
1230312354
underscore@~1.8.3:
1230412355
version "1.8.3"
1230512356
resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.8.3.tgz#4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022"

0 commit comments

Comments
 (0)