(executables
 (names hypertree)
 (libraries js_of_ocaml-lwt)
 (modes js wasm)
 (js_of_ocaml
  (compilation_mode separate)
  (build_runtime_flags
   :standard
   --file
   %{dep:image_info.json}
   --file
   %{dep:messages.json}
   --file
   %{dep:tree.json}))
 (preprocess
  (pps js_of_ocaml-ppx js_of_ocaml-ppx_deriving_json)))

(alias
 (name default)
 (deps
  hypertree.bc.js
  index.html
  image_info.json
  messages.json
  tree.json
  (glob_files icons/*.{png,jpg})
  (glob_files thumbnails/*.{png,jpg})))

(alias
 (name default)
 (enabled_if %{env:WASM_OF_OCAML=false})
 (deps hypertree.bc.wasm.js))
