@@ -17,6 +17,7 @@ let compilersDir = path.join(__dirname, "..", "compilers")
1717let bsc = path . join ( compilersDir , 'node_modules' , 'rescript-1110' , process . platform , 'bsc.exe' ) ;
1818let rescriptBin = path . join ( compilersDir , 'node_modules' , 'rescript-1110' , 'rescript' ) ;
1919let rescriptCoreCompiled = path . join ( compilersDir , 'node_modules' , '@rescript' , 'core' , 'lib' , 'ocaml' ) ;
20+ let rescriptReactCompiled = path . join ( compilersDir , 'node_modules' , '@rescript' , 'react' , 'lib' , 'ocaml' ) ;
2021
2122const prepareCompilers = ( ) => {
2223 if ( fs . existsSync ( bsc ) ) {
@@ -26,11 +27,11 @@ const prepareCompilers = () => {
2627 child_process . execFileSync ( "npm" , [ 'install' ] , { cwd : compilersDir } )
2728}
2829
29- const prepareRescriptCore = ( ) => {
30- if ( fs . existsSync ( rescriptCoreCompiled ) ) {
30+ const prepareDependencies = ( ) => {
31+ if ( fs . existsSync ( rescriptCoreCompiled ) && fs . existsSync ( rescriptReactCompiled ) ) {
3132 return ;
3233 }
33- console . log ( "Rescript Core not installed. Installing..." ) ;
34+ console . log ( "Dependencies not installed. Installing..." ) ;
3435 child_process . execFileSync ( rescriptBin , [ ] , { cwd : compilersDir } )
3536}
3637
@@ -79,7 +80,7 @@ let postprocessOutput = (file, error) => {
7980
8081
8182prepareCompilers ( ) ;
82- prepareRescriptCore ( ) ;
83+ prepareDependencies ( ) ;
8384
8485console . log ( "Running tests..." )
8586fs . writeFileSync ( tempFileName , '' )
@@ -100,6 +101,10 @@ glob.sync(__dirname + '/../pages/docs/manual/latest/**/*.mdx').forEach((file) =>
100101 tempFileName ,
101102 '-I' ,
102103 rescriptCoreCompiled ,
104+ '-I' ,
105+ rescriptReactCompiled ,
106+ '-bs-jsx' ,
107+ '4' ,
103108 '-w' ,
104109 '-109' ,
105110 '-uncurried' ,
0 commit comments