Skip to content

Commit 894f0b5

Browse files
committed
Make sure rescript builds the playground-bundling project before generating cmijs
1 parent 18d785d commit 894f0b5

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

packages/playground-bundling/scripts/generate_cmijs.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ function e(cmd) {
4848

4949
e(`npm install`);
5050
e(`npm link ${RESCRIPT_COMPILER_ROOT_DIR}`);
51+
e(`npx rescript`)
5152

5253
const packages = bsconfig["bs-dependencies"];
5354

@@ -89,14 +90,10 @@ function buildThirdPartyCmijs() {
8990

9091
const cmijFile = path.join(outputFolder, `cmij.js`);
9192

92-
if (!fs.existsSync(PLAYGROUND_DIR)) {
93-
console.error(`PLAYGROUND_DIR "${PLAYGROUND_DIR}" does not exist`);
94-
process.exit(1);
95-
}
96-
9793
if (!fs.existsSync(outputFolder)) {
9894
fs.mkdirSync(outputFolder, { recursive: true });
9995
}
96+
10097
e(`find ${libEs6Folder} -name '*.js' -exec cp {} ${outputFolder} \\;`);
10198
e(
10299
`find ${libOcamlFolder} -name "*.cmi" -or -name "*.cmj" | xargs -n1 basename | xargs js_of_ocaml build-fs -o ${cmijFile} -I ${libOcamlFolder}`

0 commit comments

Comments
 (0)