File tree Expand file tree Collapse file tree 2 files changed +17
-13
lines changed Expand file tree Collapse file tree 2 files changed +17
-13
lines changed Original file line number Diff line number Diff line change 3
3
# # building js
4
4
# ocamlbuild -use-ocamlfind -no-hygiene -syntax camlp4o -pkgs js_of_ocaml,js_of_ocaml.syntax,js_of_ocaml.toplevel exports.byte
5
5
6
- ocamlbuild -lflags -no-check-prims -use-ocamlfind -no-hygiene -pkgs compiler-libs.toplevel -no-links jsoo_exports.byte
7
- js_of_ocaml -I +compiler-libs --toplevel +dynlink.js +toplevel.js +weak.js _build/jsoo_exports.byte -o _build/exports.js
6
+ 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
8
8
9
+ rm -rf $BUCKLESCRIPT_DOC /js-demo/exports.js && cp _build/exports.js $BUCKLESCRIPT_DOC /js-demo/
9
10
10
- rm -rf $BUCKLESCRIPT_DOC /js-demo/exports.js && cp _build/exports.js $BUCKLESCRIPT_DOC /js-demo/exports.js
11
-
12
- ocamlbuild -use-ocamlfind -no-hygiene -no-links js_generate_require.byte --
13
- rm -rf $BUCKLESCRIPT_DOC /js-demo/pre_load.js
14
- cp ./pre_load.js $BUCKLESCRIPT_DOC /js-demo/
15
- # TODO: build with amd first
16
- 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
17
16
18
17
19
18
Original file line number Diff line number Diff line change @@ -53,12 +53,17 @@ let export (field : string) v =
53
53
Js.Unsafe. set (Js.Unsafe. global) field v
54
54
;;
55
55
56
+ (* To add a directory to the load path *)
57
+
58
+ let dir_directory d =
59
+ Config. load_path := d :: ! Config. load_path
60
+
56
61
57
62
let () =
58
- Sys. interactive := false ;
59
- Topdirs. dir_directory " /cmis" ;
60
- Toploop. initialize_toplevel_env () ;
61
- Toploop. input_name := " //toplevel//" ;
63
+ Sys. interactive := false ; (* TODO: remove *)
64
+ dir_directory " /cmis" ;
65
+ (* Toploop.initialize_toplevel_env (); *)
66
+ (* Toploop.input_name := "//toplevel//"; *)
62
67
Sys. interactive := true
63
68
64
69
You can’t perform that action at this time.
0 commit comments