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) {
48
48
49
49
e ( `npm install` ) ;
50
50
e ( `npm link ${ RESCRIPT_COMPILER_ROOT_DIR } ` ) ;
51
+ e ( `npx rescript clean` ) ;
51
52
e ( `npx rescript` ) ;
52
53
53
54
const packages = bsconfig [ "bs-dependencies" ] ;
@@ -63,10 +64,16 @@ function buildCompilerCmij() {
63
64
"ocaml"
64
65
) ;
65
66
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
+ }
67
74
68
75
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 } `
70
77
) ;
71
78
}
72
79
Original file line number Diff line number Diff line change 1
1
require ( "./compiler.js" )
2
- require ( "./packages/compilerCmij .js" )
2
+ require ( "./packages/compiler-builtins/cmij .js" )
3
3
require ( "./packages/@rescript/react/cmij.js" )
4
4
require ( "./packages/@rescript/core/cmij.js" )
5
5
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ if [ ! -f "${NETRC_FILE}" ]; then
29
29
echo " machine ${KEYCDN_SRV} login $KEYCDN_USER password $KEYCDN_PASSWORD " > " ${NETRC_FILE} "
30
30
fi
31
31
32
- PACKAGES=( " @rescript/react" )
32
+ PACKAGES=( " compiler-builtins " " @rescript/react" " @rescript/core " )
33
33
34
34
echo " Uploading compiler.js file..."
35
35
curl --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