Skip to content

Commit d678f4a

Browse files
committed
Merge pull request #407 from bloomberg/customize_flags
Customize flags and make sure `cmj` behaves the same as `cmi` (#392)
2 parents e01ffd8 + f73be3d commit d678f4a

File tree

11 files changed

+725
-183
lines changed

11 files changed

+725
-183
lines changed

jscomp/bin/compiler.ml

Lines changed: 362 additions & 91 deletions
Large diffs are not rendered by default.

jscomp/js_config.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ type env =
3737
let default_env = ref NodeJS
3838

3939
let ext = ref ".js"
40+
let cmj_ext = ".cmj"
4041
let get_ext () = !ext
4142
let get_env () = !default_env
4243

jscomp/js_config.mli

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ type env =
3333
| AmdJS
3434
| Goog of string option
3535

36+
val cmj_ext : string
3637
val get_env : unit -> env
3738
val get_ext : unit -> string
3839

jscomp/js_implementation.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ let implementation ppf sourcefile outputprefix =
7676
match
7777
Lam_compile_group.lambda_as_module
7878
finalenv current_signature
79-
sourcefile lambda with
79+
sourcefile outputprefix lambda with
8080
| e -> e
8181
| exception e ->
8282
(* Save to a file instead so that it will not scare user *)

0 commit comments

Comments
 (0)