Skip to content

Commit ff9cb1b

Browse files
committed
use tuple-style
1 parent e8a731e commit ff9cb1b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

scripts/repl.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,15 @@ var OCAMLC = path.join(nativePath, "ocamlc.opt");
4545
var OCAMLRUN = path.join(nativePath, "ocamlrun");
4646
var JSOO = path.join(__dirname, "..", "vendor", "js_of_ocaml.bc");
4747
function prepare(isDev) {
48-
console.log(`building byte code version of the compiler [${isDev ? "development" : "production"}]`);
49-
var ocamlDebugFlag = isDev ? "-g " : "";
50-
var jsooDebugFlag = isDev ? "--pretty " : "";
48+
var [env, ocamlFlag, jsooFlag] = isDev
49+
? ["development", "-g ", "--pretty "]
50+
: ["production", "", ""];
51+
console.log(`building byte code version of the compiler [${env}]`);
5152
e(
52-
`${OCAMLC} ${ocamlDebugFlag}-w -30-40 -no-check-prims -I ${jsRefmtCompDir} ${jsRefmtCompDir}/js_compiler.mli ${jsRefmtCompDir}/js_compiler.ml -o jsc.byte `
53+
`${OCAMLC} ${ocamlFlag}-w -30-40 -no-check-prims -I ${jsRefmtCompDir} ${jsRefmtCompDir}/js_refmt_compiler.mli ${jsRefmtCompDir}/js_refmt_compiler.ml -o jsc.byte `
5354
);
5455
console.log("building js version");
55-
e(`${OCAMLRUN} ${JSOO} compile jsc.byte ${jsooDebugFlag}-o exports.js`);
56+
e(`${OCAMLRUN} ${JSOO} compile jsc.byte ${jsooFlag}-o exports.js`);
5657
console.log("copy js artifacts");
5758
e(`cp ../lib/js/*.js ${playground}/stdlib`);
5859
e(`mv ./exports.js ${playground}`);

0 commit comments

Comments
 (0)