version = "3.3.0"
description = "Js_of_ocaml ppx"
requires(ppx_driver) = "compiler-libs.common
                        ocaml-migrate-parsetree
                        ppx_tools_versioned"
archive(ppx_driver,byte) = "ppx_js.cma"
archive(ppx_driver,native) = "ppx_js.cmxa"
plugin(ppx_driver,byte) = "ppx_js.cma"
plugin(ppx_driver,native) = "ppx_js.cmxs"
# This is what dune uses to find out the runtime dependencies of
# a preprocessor
ppx_runtime_deps = "js_of_ocaml"
# This line makes things transparent for people mixing preprocessors
# and normal dependencies
requires(-ppx_driver) = "js_of_ocaml"
ppx(-ppx_driver,-custom_ppx) = "./ppx.exe --as-ppx"

package "deriving" (
  description = "deprecated alias. use js_of_ocaml-ppx_deriving_json directly"
  requires = "js_of_ocaml-ppx_deriving_json"
)

package "as-lib" (
  archive(byte) = "ppx_js.cma"
  archive(native) = "ppx_js.cmxa"
  plugin(byte) = "ppx_js.cma"
  plugin(native) = "ppx_js.cmxs"
  exists_if = "ppx_js.cma"
  requires = "compiler-libs
              compiler-libs.common
              ocaml-migrate-parsetree
              ppx_tools_versioned"
)
