@@ -17,6 +17,7 @@ let compilersDir = path.join(__dirname, "..", "compilers")
17
17
let bsc = path . join ( compilersDir , 'node_modules' , 'rescript-1110' , process . platform , 'bsc.exe' ) ;
18
18
let rescriptBin = path . join ( compilersDir , 'node_modules' , 'rescript-1110' , 'rescript' ) ;
19
19
let rescriptCoreCompiled = path . join ( compilersDir , 'node_modules' , '@rescript' , 'core' , 'lib' , 'ocaml' ) ;
20
+ let rescriptReactCompiled = path . join ( compilersDir , 'node_modules' , '@rescript' , 'react' , 'lib' , 'ocaml' ) ;
20
21
21
22
const prepareCompilers = ( ) => {
22
23
if ( fs . existsSync ( bsc ) ) {
@@ -26,11 +27,11 @@ const prepareCompilers = () => {
26
27
child_process . execFileSync ( "npm" , [ 'install' ] , { cwd : compilersDir } )
27
28
}
28
29
29
- const prepareRescriptCore = ( ) => {
30
- if ( fs . existsSync ( rescriptCoreCompiled ) ) {
30
+ const prepareDependencies = ( ) => {
31
+ if ( fs . existsSync ( rescriptCoreCompiled ) && fs . existsSync ( rescriptReactCompiled ) ) {
31
32
return ;
32
33
}
33
- console . log ( "Rescript Core not installed. Installing..." ) ;
34
+ console . log ( "Dependencies not installed. Installing..." ) ;
34
35
child_process . execFileSync ( rescriptBin , [ ] , { cwd : compilersDir } )
35
36
}
36
37
@@ -79,7 +80,7 @@ let postprocessOutput = (file, error) => {
79
80
80
81
81
82
prepareCompilers ( ) ;
82
- prepareRescriptCore ( ) ;
83
+ prepareDependencies ( ) ;
83
84
84
85
console . log ( "Running tests..." )
85
86
fs . writeFileSync ( tempFileName , '' )
@@ -100,6 +101,10 @@ glob.sync(__dirname + '/../pages/docs/manual/latest/**/*.mdx').forEach((file) =>
100
101
tempFileName ,
101
102
'-I' ,
102
103
rescriptCoreCompiled ,
104
+ '-I' ,
105
+ rescriptReactCompiled ,
106
+ '-bs-jsx' ,
107
+ '4' ,
103
108
'-w' ,
104
109
'-109' ,
105
110
'-uncurried' ,
0 commit comments