Skip to content

Commit

Permalink
Add js_files in toplevels.json
Browse files Browse the repository at this point in the history
  • Loading branch information
gpetiot committed Sep 5, 2023
1 parent 91f3526 commit 24afe9d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/voodoo-prep/jsoo_toplevel.ml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,8 @@ let to_yojson t =
let cma = ("cma", `String (js_name t)) in
let dep_cmas = ("dep_cmas", `List (List.map Jsoo_cma.to_yojson t.dep_cmas)) in
let cmis = ("cmis", `List (List.map Jsoo_cmi.to_yojson t.cmis)) in
`Assoc [ package; cma; dep_cmas; cmis ]
let js_files =
( "js_files",
`List (List.map (fun s -> `String (Fpath.to_string s)) t.js_files) )
in
`Assoc [ package; cma; dep_cmas; cmis; js_files ]
4 changes: 3 additions & 1 deletion test/toplevel.t
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Generate the toplevel documentation
Ignoring jsoo option passed: -linkall

$ voodoo-prep jsoo -p $PKG
voodoo-prep: [INFO] Built jsoo/universes/88/toplevel/1.0/toplevel.cma.js ✅

$ voodoo-do -p $PKG -b 2> /dev/null

Expand Down Expand Up @@ -453,7 +454,8 @@ Generates a toplevels.json file
"/toplevels/jsoo/universes/45/ocaml-base-compiler/5.0.0/lib/ocaml/stdlib__Uchar.cmi",
"/toplevels/jsoo/universes/45/ocaml-base-compiler/5.0.0/lib/ocaml/stdlib__Option.cmi",
"/toplevels/jsoo/universes/45/ocaml-base-compiler/5.0.0/lib/ocaml/stdlib__Effect.cmi"
]
],
"js_files": []
}
]

Expand Down

0 comments on commit 24afe9d

Please sign in to comment.