Skip to content

Commit 1658e9d

Browse files
author
Roland Peelen
committed
double build script
1 parent 18cc13b commit 1658e9d

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ lib: build rewatch node_modules/.bin/semver
5252
node scripts/ninja.js build
5353
./scripts/prebuilt.js
5454

55+
lib-rewatch: build rewatch node_modules/.bin/semver
56+
./scripts/build-lib.sh && ./scripts/prebuilt.js
57+
5558
artifacts: lib
5659
./scripts/makeArtifactList.js
5760

scripts/build-lib.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/sh
2+
3+
./rewatch/target/release/rewatch --bsc-path "$(pwd)/bsc" clean
4+
5+
./rewatch/target/release/rewatch --bsc-path "$(pwd)/bsc" build
6+
cp jscomp/others/*.js lib/js
7+
8+
contents="$(jq '."package-specs".module = "es6"' < rescript.json)" && echo "${contents}" > rescript.json
9+
10+
./rewatch/target/release/rewatch --bsc-path "$(pwd)/bsc" build
11+
cp jscomp/others/*.js lib/es6
12+
13+
contents="$(jq '."package-specs".module = "commonjs"' < rescript.json)" && echo "${contents}" > rescript.json

0 commit comments

Comments
 (0)