Skip to content

Commit 5a108ca

Browse files
committed
ready for enhance topleve
1 parent a2d0a64 commit 5a108ca

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

jscomp/common/js_config.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ let runtime_set =
269269
array ;
270270
format ;
271271
string ;
272+
bytes;
272273
float ;
273274
hash ;
274275
oo ;

jscomp/js.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ set -e
44
# ocamlbuild -use-ocamlfind -no-hygiene -syntax camlp4o -pkgs js_of_ocaml,js_of_ocaml.syntax,js_of_ocaml.toplevel exports.byte
55

66
ocamlbuild -lflags -no-check-prims -use-ocamlfind -no-hygiene -pkgs compiler-libs.bytecomp -no-links jsoo_exports.byte
7-
js_of_ocaml -I +compiler-libs --toplevel +dynlink.js +toplevel.js +weak.js _build/jsoo_exports.byte -I ./runtime/ --file js.cmi:/cmis -o _build/exports.js
7+
js_of_ocaml -I +compiler-libs --toplevel +dynlink.js +toplevel.js +weak.js _build/jsoo_exports.byte -I ./runtime/ --file js.cmi:/cmis js_unsafe.cmi:/cmis js_re.cmi:/cmis -o _build/exports.js
88

99
rm -rf $BUCKLESCRIPT_DOC/js-demo/exports.js && cp _build/exports.js $BUCKLESCRIPT_DOC/js-demo/
1010

11-
# ocamlbuild -use-ocamlfind -no-hygiene -no-links js_generate_require.byte --
12-
# rm -rf $BUCKLESCRIPT_DOC/js-demo/pre_load.js
13-
# cp ./pre_load.js $BUCKLESCRIPT_DOC/js-demo/
14-
# # TODO: build with amd first
15-
# cp ../lib/amdjs/*.js $BUCKLESCRIPT_DOC/js-demo/stdlib
11+
ocamlbuild -use-ocamlfind -no-hygiene -no-links js_generate_require.byte --
12+
rm -rf $BUCKLESCRIPT_DOC/js-demo/pre_load.js
13+
cp ./pre_load.js $BUCKLESCRIPT_DOC/js-demo/
14+
# TODO: build with amd first
15+
cp ../lib/amdjs/*.js $BUCKLESCRIPT_DOC/js-demo/stdlib
1616

1717

1818

jscomp/js_generate_require.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ let () =
3939
Ext_pervasives.with_file_as_chan "./pre_load.js"
4040
(fun chan ->
4141
output_string chan
42-
(Printf.sprintf "require([%s], function(){})"
42+
(Printf.sprintf "function start(gist){require([%s], function(){loadGist(gist)})}"
4343
(String.concat ","
4444
(List.map (Printf.sprintf "%S" )
4545
(std_files @ runtime_files)

0 commit comments

Comments
 (0)