Skip to content

Commit f683fbf

Browse files
author
Roland Peelen
committed
double build script
1 parent eaf1974 commit f683fbf

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
@@ -53,6 +53,9 @@ lib: build node_modules/.bin/semver
5353
node scripts/ninja.js build
5454
./scripts/prebuilt.js
5555

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

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)