Skip to content

Commit 8e66ca0

Browse files
committed
add routes
1 parent ae0d059 commit 8e66ca0

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

documentation-site.opam

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ depends: [
1818
"reason" {>= "3.10.0"}
1919
"reason-react"
2020
"reason-react-ppx"
21+
"routes"
2122
"ocamlformat"
2223
"js_of_ocaml"
2324
"cmarkit" {dev}
@@ -32,6 +33,7 @@ pin-depends: [
3233
[ "reason-react.dev" "git+https://github.com/reasonml/reason-react.git#4ee2eda353628090eda95e0b8dabe4e2be50f954" ]
3334
[ "reason-react-ppx.dev" "git+https://github.com/reasonml/reason-react.git#4ee2eda353628090eda95e0b8dabe4e2be50f954" ]
3435
[ "cmarkit.dev" "git+https://github.com/dbuenzli/cmarkit.git#f37c8ea86fd0be8dba7a8babcee3682e0e047d91" ]
36+
[ "routes.dev" "git+https://github.com/jchavarri/routes.git#57fb76038b429a6adb4e42aeef04cca7079fe157" ]
3537
]
3638
build: [
3739
["dune" "subst"] {dev}

playground/dune

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
; melange doesn't include belt and dom anymore, including them below leads to
77
; `_build/default/playground/output/node_modules` to include the runtimes
88
melange.belt
9-
melange.dom)
9+
melange.dom
10+
routes)
1011
(modules) ; Empty, we just want to the js artifacts from the libraries
1112
(module_systems es6))
1213

@@ -19,6 +20,15 @@
1920
(bash
2021
"find $(dirname %{some-cmi}) -name \"*.cmi\" -or -name \"*.cmj\" | xargs js_of_ocaml build-fs -o %{target}")))
2122

23+
(rule
24+
(deps
25+
%{bin:js_of_ocaml}
26+
(:some-cmi %{lib:routes:melange/routes.cmi}))
27+
(target routes-cmijs.js)
28+
(action
29+
(bash
30+
"find $(dirname %{some-cmi}) -name \"*.cmi\" -or -name \"*.cmj\" | xargs js_of_ocaml build-fs -o %{target}")))
31+
2232
(executable
2333
(name format)
2434
(modules format)
@@ -37,6 +47,7 @@
3747
(deps
3848
(alias playground-runtime-js)
3949
format.bc.js
40-
reason-react-cmijs.js)
50+
reason-react-cmijs.js
51+
routes-cmijs.js)
4152
(action
4253
(echo "assets generated")))

playground/src/app.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import "./App.css";
22
import "../../_build/default/playground/reason-react-cmijs";
3+
import "../../_build/default/playground/routes-cmijs";
34
import "../../_opam/bin/mel_playground.bc";
45
import "../../_opam/bin/melange-cmijs";
56
import "../../_opam/bin/format.bc.js";

0 commit comments

Comments
 (0)