(executables
 (names hypertree)
 (libraries js_of_ocaml-lwt)
 (modes byte)
 (preprocess
  (pps js_of_ocaml-ppx)))

(rule
 (targets hypertree.js)
 (action
  (run
   %{bin:js_of_ocaml}
   --source-map
   %{dep:hypertree.bc}
   -o
   %{targets}
   --pretty
   --file
   %{dep:image_info.json}
   --file
   %{dep:messages.json}
   --file
   %{dep:tree.json})))

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