Skip to content

Commit 856e0ad

Browse files
committed
don't touch config_util
1 parent 9a2a1ee commit 856e0ad

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

jscomp/core/config_util.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
let find_in_path_uncap path name =
3131
let uname = Ext_string.uncapitalize_ascii name in
3232
let rec try_dir = function
33-
| [] -> if Sys.file_exists name then Some name else None
33+
| [] -> None
3434
| dir::rem ->
3535
let ufullname = Filename.concat dir uname in
3636
if Sys.file_exists ufullname then Some ufullname

jscomp/main/jsoo_main.ml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,13 @@ let export (field : string) v =
107107
Js.Unsafe.set (Js.Unsafe.global) field v
108108
;;
109109

110+
(* To add a directory to the load path *)
111+
112+
let dir_directory d =
113+
Config.load_path := d :: !Config.load_path
114+
let () =
115+
dir_directory "/static"
116+
110117
let make_compiler name impl =
111118
export name
112119
(Js.Unsafe.(obj

0 commit comments

Comments
 (0)