@@ -45,14 +45,15 @@ var OCAMLC = path.join(nativePath, "ocamlc.opt");
45
45
var OCAMLRUN = path . join ( nativePath , "ocamlrun" ) ;
46
46
var JSOO = path . join ( __dirname , ".." , "vendor" , "js_of_ocaml.bc" ) ;
47
47
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 } ]` ) ;
51
52
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 `
53
54
) ;
54
55
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` ) ;
56
57
console . log ( "copy js artifacts" ) ;
57
58
e ( `cp ../lib/js/*.js ${ playground } /stdlib` ) ;
58
59
e ( `mv ./exports.js ${ playground } ` ) ;
0 commit comments