File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed
packages/playground-bundling/scripts Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ function e(cmd) {
4848
4949e ( `npm install` ) ;
5050e ( `npm link ${ RESCRIPT_COMPILER_ROOT_DIR } ` ) ;
51+ e ( `npx rescript clean` ) ;
5152e ( `npx rescript` ) ;
5253
5354const packages = bsconfig [ "bs-dependencies" ] ;
@@ -63,10 +64,16 @@ function buildCompilerCmij() {
6364 "ocaml"
6465 ) ;
6566
66- const rescriptCompilerCmijFile = path . join ( PACKAGES_DIR , "compilerCmij.js" ) ;
67+ const outputFolder = path . join ( PACKAGES_DIR , "compiler-builtins" ) ;
68+
69+ const cmijFile = path . join ( outputFolder , `cmij.js` ) ;
70+
71+ if ( ! fs . existsSync ( outputFolder ) ) {
72+ fs . mkdirSync ( outputFolder , { recursive : true } ) ;
73+ }
6774
6875 e (
69- `find ${ rescriptLibOcamlFolder } -name "*.cmi" -or -name "*.cmj" | xargs -n1 basename | xargs js_of_ocaml build-fs -o ${ rescriptCompilerCmijFile } -I ${ rescriptLibOcamlFolder } `
76+ `find ${ rescriptLibOcamlFolder } -name "*.cmi" -or -name "*.cmj" | xargs -n1 basename | xargs js_of_ocaml build-fs -o ${ cmijFile } -I ${ rescriptLibOcamlFolder } `
7077 ) ;
7178}
7279
Original file line number Diff line number Diff line change 11require ( "./compiler.js" )
2- require ( "./packages/compilerCmij .js" )
2+ require ( "./packages/compiler-builtins/cmij .js" )
33require ( "./packages/@rescript/react/cmij.js" )
44require ( "./packages/@rescript/core/cmij.js" )
55
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ if [ ! -f "${NETRC_FILE}" ]; then
2929 echo " machine ${KEYCDN_SRV} login $KEYCDN_USER password $KEYCDN_PASSWORD " > " ${NETRC_FILE} "
3030fi
3131
32- PACKAGES=( " @rescript/react" )
32+ PACKAGES=( " compiler-builtins " " @rescript/react" " @rescript/core " )
3333
3434echo " Uploading compiler.js file..."
3535curl --ftp-create-dirs -T " ${SCRIPT_DIR} /compiler.js" --ssl --netrc-file $NETRC_FILE ftp://${KEYCDN_SRV} /v${VERSION} /compiler.js
You can’t perform that action at this time.
0 commit comments