File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
packages/playground-bundling/scripts Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,24 @@ function e(cmd) {
45
45
46
46
const packages = bsconfig [ "bs-dependencies" ] ;
47
47
48
+ // We need to build the compiler's builtin modules as a separate cmij.
49
+ // Otherwise we can't use them for compilation within the playground.
50
+ function buildCompilerCmij ( ) {
51
+ const rescriptLibOcamlFolder = path . join (
52
+ PROJECT_ROOT_DIR ,
53
+ "node_modules" ,
54
+ "rescript" ,
55
+ "lib" ,
56
+ "ocaml"
57
+ ) ;
58
+
59
+ const rescriptCompilerCmijFile = path . join ( PACKAGES_DIR , "compilerCmij.js" ) ;
60
+
61
+ e (
62
+ `find ${ rescriptLibOcamlFolder } -name "*.cmi" -or -name "*.cmj" | xargs -n1 basename | xargs js_of_ocaml build-fs -o ${ rescriptCompilerCmijFile } -I ${ rescriptLibOcamlFolder } `
63
+ ) ;
64
+ }
65
+
48
66
packages . forEach ( function installLib ( package ) {
49
67
const libOcamlFolder = path . join (
50
68
PROJECT_ROOT_DIR ,
You can’t perform that action at this time.
0 commit comments