From 4e3574c24d1eba7e188ea42a3d88013c7def0a08 Mon Sep 17 00:00:00 2001 From: Vincent Balat Date: Fri, 22 Mar 2024 15:47:33 +0100 Subject: [PATCH 1/4] Update basic template to be easier to use for beginner --- pkg/distillery/templates/client-server.basic/client!dune | 4 ++-- pkg/distillery/templates/client-server.basic/dune | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/distillery/templates/client-server.basic/client!dune b/pkg/distillery/templates/client-server.basic/client!dune index 54e1e2f1f..5f3f0bc37 100644 --- a/pkg/distillery/templates/client-server.basic/client!dune +++ b/pkg/distillery/templates/client-server.basic/client!dune @@ -5,8 +5,8 @@ (pps js_of_ocaml-ppx lwt_ppx - ocsigen-i18n - -- --prefix %%%MODULE_NAME%%%_ --suffix _i18n --default-module %%%MODULE_NAME%%%_i18n +; ocsigen-i18n +; -- --prefix %%%MODULE_NAME%%%_ --suffix _i18n --default-module %%%MODULE_NAME%%%_i18n ) ) (js_of_ocaml diff --git a/pkg/distillery/templates/client-server.basic/dune b/pkg/distillery/templates/client-server.basic/dune index 0b2909cad..0a621df0b 100644 --- a/pkg/distillery/templates/client-server.basic/dune +++ b/pkg/distillery/templates/client-server.basic/dune @@ -3,16 +3,16 @@ (executables (names %%%PROJECT_NAME%%%) (modes (byte plugin) (native plugin)) - (libraries eliom.server ocsipersist.dbm) + (libraries eliom.server ocsipersist.sqlite) (preprocess (pps lwt_ppx - pgocaml_ppx +; pgocaml_ppx js_of_ocaml-ppx_deriving_json - ocsigen-i18n +; ocsigen-i18n ocsigen-ppx-rpc --rpc-raw eliom.ppx.server - -- --prefix %%%MODULE_NAME%%%_ --suffix _i18n --default-module %%%MODULE_NAME%%%_i18n +; -- --prefix %%%MODULE_NAME%%%_ --suffix _i18n --default-module %%%MODULE_NAME%%%_i18n ) ) ) From 1a9e37a6cb9e98eb5aa37453a79c26f336f12ddd Mon Sep 17 00:00:00 2001 From: Vincent Balat Date: Fri, 22 Mar 2024 15:50:43 +0100 Subject: [PATCH 2/4] Add license to the basic template --- .../templates/client-server.basic/LICENSE | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pkg/distillery/templates/client-server.basic/LICENSE diff --git a/pkg/distillery/templates/client-server.basic/LICENSE b/pkg/distillery/templates/client-server.basic/LICENSE new file mode 100644 index 000000000..fdddb29aa --- /dev/null +++ b/pkg/distillery/templates/client-server.basic/LICENSE @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to From 34bfea2e2330e477b8a8d8cfb3a4ea75336fc52b Mon Sep 17 00:00:00 2001 From: Vincent Balat Date: Fri, 22 Mar 2024 16:50:16 +0100 Subject: [PATCH 3/4] Fix template install --- dune-project | 2 +- eliom.opam | 2 +- pkg/distillery/dune | 4 ++-- pkg/filelist.ml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dune-project b/dune-project index 0f711fa0b..a29db3be4 100644 --- a/dune-project +++ b/dune-project @@ -33,7 +33,7 @@ The client-side code is compiled to JS using Ocsigen Js_of_ocaml or to Wasm usin (js_of_ocaml-tyxml (>= 3.6.0)) lwt_log (lwt_ppx (>= 1.2.3)) - (tyxml (and (>= 4.4.0) (< 4.5.0))) + (tyxml (and (>= 4.6.0) (< 4.7.0))) (ocsigenserver (and (>= 5.1.0) (< 6.0.0))) (ipaddr (>= 2.1)) (reactiveData (>= 0.2.1)) diff --git a/eliom.opam b/eliom.opam index f919075aa..1045caa4a 100644 --- a/eliom.opam +++ b/eliom.opam @@ -31,7 +31,7 @@ depends: [ "js_of_ocaml-tyxml" {>= "3.6.0"} "lwt_log" "lwt_ppx" {>= "1.2.3"} - "tyxml" {>= "4.6.0"} + "tyxml" {>= "4.6.0" & < "4.7.0"} "ocsigenserver" {>= "5.1.0" & < "6.0.0"} "ipaddr" {>= "2.1"} "reactiveData" {>= "0.2.1"} diff --git a/pkg/distillery/dune b/pkg/distillery/dune index 135402973..56af40e57 100644 --- a/pkg/distillery/dune +++ b/pkg/distillery/dune @@ -1,5 +1,5 @@ (data_only_dirs templates) (install (section lib) - (files (glob_files templates/client-server.basic/*) - (glob_files templates/basic.ppx/*))) + (files (glob_files templates/client-server.basic/**) + (glob_files templates/basic.ppx/**))) diff --git a/pkg/filelist.ml b/pkg/filelist.ml index 05b8adb7c..d3601f5a9 100644 --- a/pkg/filelist.ml +++ b/pkg/filelist.ml @@ -172,7 +172,7 @@ let ppx_extra = exts ["cmi"] ppx.interface @ exts ["cmx"] (ppx.interface @ ppx.internal) let ppx_api = ppx.interface -let templates_dir = "pkg/distillery" +let templates_dir = "pkg/distillery/templates" let templates = Array.to_list (Sys.readdir templates_dir) let templates_files = From 10fb0b51527ec5e243c62a2b249500329bf936ff Mon Sep 17 00:00:00 2001 From: Vincent Balat Date: Fri, 22 Mar 2024 18:12:41 +0100 Subject: [PATCH 4/4] Template: Fix typo --- .../templates/client-server.basic/PROJECT_NAME.conf.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/distillery/templates/client-server.basic/PROJECT_NAME.conf.in b/pkg/distillery/templates/client-server.basic/PROJECT_NAME.conf.in index 0c7715cef..5562efc23 100644 --- a/pkg/distillery/templates/client-server.basic/PROJECT_NAME.conf.in +++ b/pkg/distillery/templates/client-server.basic/PROJECT_NAME.conf.in @@ -20,7 +20,7 @@ +