diff --git a/documentation-site.opam b/documentation-site.opam index 2a753a5e4..052ad84bb 100644 --- a/documentation-site.opam +++ b/documentation-site.opam @@ -18,6 +18,7 @@ depends: [ "reason" {>= "3.10.0"} "reason-react" "reason-react-ppx" + "routes" "ocamlformat" "js_of_ocaml" "cmarkit" {dev} @@ -32,6 +33,7 @@ pin-depends: [ [ "reason-react.dev" "git+https://github.com/reasonml/reason-react.git#4ee2eda353628090eda95e0b8dabe4e2be50f954" ] [ "reason-react-ppx.dev" "git+https://github.com/reasonml/reason-react.git#4ee2eda353628090eda95e0b8dabe4e2be50f954" ] [ "cmarkit.dev" "git+https://github.com/dbuenzli/cmarkit.git#f37c8ea86fd0be8dba7a8babcee3682e0e047d91" ] + [ "routes.dev" "git+https://github.com/jchavarri/routes.git#57fb76038b429a6adb4e42aeef04cca7079fe157" ] ] build: [ ["dune" "subst"] {dev} diff --git a/playground/dune b/playground/dune index 88b578cda..b65db730d 100644 --- a/playground/dune +++ b/playground/dune @@ -6,7 +6,8 @@ ; melange doesn't include belt and dom anymore, including them below leads to ; `_build/default/playground/output/node_modules` to include the runtimes melange.belt - melange.dom) + melange.dom + routes) (modules) ; Empty, we just want to the js artifacts from the libraries (module_systems es6)) @@ -19,6 +20,15 @@ (bash "find $(dirname %{some-cmi}) -name \"*.cmi\" -or -name \"*.cmj\" | xargs js_of_ocaml build-fs -o %{target}"))) +(rule + (deps + %{bin:js_of_ocaml} + (:some-cmi %{lib:routes:melange/routes.cmi})) + (target routes-cmijs.js) + (action + (bash + "find $(dirname %{some-cmi}) -name \"*.cmi\" -or -name \"*.cmj\" | xargs js_of_ocaml build-fs -o %{target}"))) + (executable (name format) (modules format) @@ -37,6 +47,7 @@ (deps (alias playground-runtime-js) format.bc.js - reason-react-cmijs.js) + reason-react-cmijs.js + routes-cmijs.js) (action (echo "assets generated"))) diff --git a/playground/src/app.jsx b/playground/src/app.jsx index c5b4dcb2d..1f42f04c6 100644 --- a/playground/src/app.jsx +++ b/playground/src/app.jsx @@ -1,5 +1,6 @@ import "./App.css"; import "../../_build/default/playground/reason-react-cmijs"; +import "../../_build/default/playground/routes-cmijs"; import "../../_opam/bin/mel_playground.bc"; import "../../_opam/bin/melange-cmijs"; import "../../_opam/bin/format.bc.js";