Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .ocamlformat
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
version=0.27.0
version=0.28.1
parse-docstrings = false
wrap-comments = false
break-cases = fit
break-collection-expressions = fit-or-vertical
break-fun-decl = wrap
Expand Down
2 changes: 1 addition & 1 deletion .ocp-indent
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
normal
with=0
syntax=lwt mll
syntax=mll
max_indent=2
6 changes: 3 additions & 3 deletions dune-project
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(lang dune 3.19)

(name eliom)
(version 11.1.1)
(version 12.0.0~dev)
(maintainers dev@ocsigen.org)
(authors dev@ocsigen.org)
(license "LGPL-2.1-only WITH OCaml-LGPL-linking-exception")
Expand All @@ -28,7 +28,6 @@ The client-side code is compiled to JS using Ocsigen Js_of_ocaml or to Wasm usin
(ppxlib (>= 0.15))
(js_of_ocaml-compiler (>= 6.0))
(js_of_ocaml (>= 6.0))
(js_of_ocaml-lwt (>= 6.0))
(js_of_ocaml-ocamlbuild :build)
(js_of_ocaml-ppx (>= 6.0))
(js_of_ocaml-ppx_deriving_json (>= 6.0))
Expand All @@ -41,4 +40,5 @@ The client-side code is compiled to JS using Ocsigen Js_of_ocaml or to Wasm usin
base-bytes
(ocsipersist (and (>= 2.0) (< 3.0)))
ppx_optcomp
(xml-light (>= "2.5"))))
(xml-light (>= "2.5"))
js_of_ocaml-eio))
4 changes: 2 additions & 2 deletions eliom.opam
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
version: "11.1.1"
version: "12.0.0~dev"
synopsis: "Advanced client/server Web and mobile framework"
description: """
Eliom is a framework for implementing Web sites and client/server Web and mobile applications.
Expand All @@ -24,7 +24,6 @@ depends: [
"ppxlib" {>= "0.15"}
"js_of_ocaml-compiler" {>= "6.0"}
"js_of_ocaml" {>= "6.0"}
"js_of_ocaml-lwt" {>= "6.0"}
"js_of_ocaml-ocamlbuild" {build}
"js_of_ocaml-ppx" {>= "6.0"}
"js_of_ocaml-ppx_deriving_json" {>= "6.0"}
Expand All @@ -38,6 +37,7 @@ depends: [
"ocsipersist" {>= "2.0" & < "3.0"}
"ppx_optcomp"
"xml-light" {>= "2.5"}
"js_of_ocaml-eio"
"odoc" {with-doc}
]
build: [
Expand Down
36 changes: 18 additions & 18 deletions pkg/distillery/templates/app.exe/PROJECT_NAME.eliom
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
(* This file was generated by Eliom-distillery.
Feel free to use it, modify it, and redistribute it as you wish. *)
(* This file was generated by Eliom-distillery. Feel free to use it, modify it,
and redistribute it as you wish. *)

let%server application_name = "%%%PROJECT_NAME%%%"
let%client application_name = Eliom_client.get_application_name ()

let%server () =
Ocsipersist_settings.set_db_file "local/var/data/%%%PROJECT_NAME%%%/%%%PROJECT_NAME%%%_db";
Ocsipersist_settings.set_db_file
"local/var/data/%%%PROJECT_NAME%%%/%%%PROJECT_NAME%%%_db"

(* Create a module for the application. See
https://ocsigen.org/eliom/manual/clientserver-applications for more
Expand All @@ -15,9 +16,9 @@ module%shared App = Eliom_registration.App (struct
let global_data_path = Some ["__global_data__"]
end)

(* As the headers (stylesheets, etc) won't change, we ask Eliom not to
update the <head> of the page when changing page. (This also avoids
blinking when changing page in iOS). *)
(* As the headers (stylesheets, etc) won't change, we ask Eliom not to update
the <head> of the page when changing page. (This also avoids blinking when
changing page in iOS). *)
let%client _ = Eliom_client.persist_document_head ()

let%server main_service =
Expand All @@ -28,15 +29,14 @@ let%client main_service = ~%main_service

let%shared () =
App.register ~service:main_service (fun () () ->
Lwt.return
Eliom_content.Html.F.(
html
(head
(title (txt "%%%PROJECT_NAME%%%"))
[ css_link
~uri:
(make_uri
~service:(Eliom_service.static_dir ())
["css"; "%%%PROJECT_NAME%%%.css"])
() ])
(body [h1 [txt "Welcome to Eliom!"]])))
Eliom_content.Html.F.(
html
(head
(title (txt "%%%PROJECT_NAME%%%"))
[ css_link
~uri:
(make_uri
~service:(Eliom_service.static_dir ())
["css"; "%%%PROJECT_NAME%%%.css"])
() ])
(body [h1 [txt "Welcome to Eliom!"]])))
4 changes: 3 additions & 1 deletion pkg/distillery/templates/app.exe/dune
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,12 @@
; %%%MODULE_NAME%%%_i18n
))
(js_of_ocaml
(build_runtime_flags :standard --enable use-js-string)
(build_runtime_flags :standard --enable use-js-string --enable effects)
(flags
:standard
--enable
effects
--enable
with-js-error
--enable
use-js-string
Expand Down
33 changes: 16 additions & 17 deletions pkg/distillery/templates/app.lib/PROJECT_NAME.eliom
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(* This file was generated by Eliom-distillery.
Feel free to use it, modify it, and redistribute it as you wish. *)
(* This file was generated by Eliom-distillery. Feel free to use it, modify it,
and redistribute it as you wish. *)

let%server application_name = "%%%PROJECT_NAME%%%"
let%client application_name = Eliom_client.get_application_name ()
Expand All @@ -12,9 +12,9 @@ module%shared App = Eliom_registration.App (struct
let global_data_path = Some ["__global_data__"]
end)

(* As the headers (stylesheets, etc) won't change, we ask Eliom not to
update the <head> of the page when changing page. (This also avoids
blinking when changing page in iOS). *)
(* As the headers (stylesheets, etc) won't change, we ask Eliom not to update
the <head> of the page when changing page. (This also avoids blinking when
changing page in iOS). *)
let%client _ = Eliom_client.persist_document_head ()

let%server main_service =
Expand All @@ -25,15 +25,14 @@ let%client main_service = ~%main_service

let%shared () =
App.register ~service:main_service (fun () () ->
Lwt.return
Eliom_content.Html.F.(
html
(head
(title (txt "%%%PROJECT_NAME%%%"))
[ css_link
~uri:
(make_uri
~service:(Eliom_service.static_dir ())
["css"; "%%%PROJECT_NAME%%%.css"])
() ])
(body [h1 [txt "Welcome to Eliom!"]])))
Eliom_content.Html.F.(
html
(head
(title (txt "%%%PROJECT_NAME%%%"))
[ css_link
~uri:
(make_uri
~service:(Eliom_service.static_dir ())
["css"; "%%%PROJECT_NAME%%%.css"])
() ])
(body [h1 [txt "Welcome to Eliom!"]])))
4 changes: 3 additions & 1 deletion pkg/distillery/templates/app.lib/dune
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,12 @@
; %%%MODULE_NAME%%%_i18n
))
(js_of_ocaml
(build_runtime_flags :standard --enable use-js-string)
(build_runtime_flags :standard --enable use-js-string --enable effects)
(flags
:standard
--enable
effects
--enable
with-js-error
--enable
use-js-string
Expand Down
13 changes: 6 additions & 7 deletions pkg/distillery/templates/basic.ppx/PROJECT_NAME.eliom
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ let () =
%%%MODULE_NAME%%%_app.register
~service:main_service
(fun () () ->
Lwt.return
(Eliom_tools.F.html
~title:"%%%PROJECT_NAME%%%"
~css:[["css";"%%%PROJECT_NAME%%%.css"]]
Html.F.(body [
h1 [txt "Welcome from Eliom's distillery!"];
])))
(Eliom_tools.F.html
~title:"%%%PROJECT_NAME%%%"
~css:[["css";"%%%PROJECT_NAME%%%.css"]]
Html.F.(body [
h1 [txt "Welcome from Eliom's distillery!"];
])))
6 changes: 3 additions & 3 deletions src/lib/client/dune
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
ocsigenserver.polytables
js_of_ocaml
js_of_ocaml-tyxml
js_of_ocaml-lwt
lwt_react
react
ocsigenserver.baselib.base
logs
logs.browser
cohttp
tyxml
reactiveData)
reactiveData
js_of_ocaml-eio)
(foreign_stubs
(language c)
(names eliom_stubs))
Expand Down
4 changes: 4 additions & 0 deletions src/lib/client/dune.client
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
(rule (copy# ../eio_react.shared.ml eio_react.ml))
(rule (copy# ../eio_react.shared.mli eio_react.mli))
(rule (copy# ../eliom_bus.client.ml eliom_bus.ml))
(rule (copy# ../eliom_bus.client.mli eliom_bus.mli))
(rule (copy# ../eliom_client.client.ml eliom_client.ml))
Expand Down Expand Up @@ -90,6 +92,8 @@
(with-stdout-to %{target}
(chdir .. (run ppx_eliom_client --as-pp --intf %{deps})))))
(rule (copy# ../eliom_shared_sigs.shared.mli eliom_shared_sigs.mli))
(rule (copy# ../eliom_stream.shared.ml eliom_stream.ml))
(rule (copy# ../eliom_stream.shared.mli eliom_stream.mli))
(rule (target eliom_tools.ml) (deps ../eliom_tools.eliom)
(action
(with-stdout-to %{target}
Expand Down
Loading
Loading