From 0d9792abc9a0bd44b173c60e33ef22bdf85236fd Mon Sep 17 00:00:00 2001 From: mynomoto Date: Sun, 19 Nov 2023 15:40:59 -0300 Subject: [PATCH] Hoplon and Javelin plugins --- plugins/demo/bb.edn | 4 +++- plugins/demo/resources/public/index.html | 15 +++++++++++---- plugins/hoplon/deps.edn | 3 +++ plugins/hoplon/src/scittle/hoplon.cljs | 9 +++++++++ plugins/hoplon/src/scittle_plugin.edn | 9 +++++++++ plugins/javelin/deps.edn | 3 +++ plugins/javelin/src/scittle/javelin.cljs | 9 +++++++++ plugins/javelin/src/scittle_plugin.edn | 8 ++++++++ 8 files changed, 55 insertions(+), 5 deletions(-) create mode 100644 plugins/hoplon/deps.edn create mode 100644 plugins/hoplon/src/scittle/hoplon.cljs create mode 100644 plugins/hoplon/src/scittle_plugin.edn create mode 100644 plugins/javelin/deps.edn create mode 100644 plugins/javelin/src/scittle/javelin.cljs create mode 100644 plugins/javelin/src/scittle_plugin.edn diff --git a/plugins/demo/bb.edn b/plugins/demo/bb.edn index bbf3388..86170d0 100644 --- a/plugins/demo/bb.edn +++ b/plugins/demo/bb.edn @@ -1,6 +1,8 @@ {:deps {io.github.babashka/scittle.build {:local/root "../../build"} ;; datascript plugin - io.github.babashka/scittle.datascript {:local/root "../../plugins/datascript"} + ; io.github.babashka/scittle.datascript {:local/root "../../plugins/datascript"} + io.github.babashka/scittle.javelin {:local/root "../../plugins/javelin"} + io.github.babashka/scittle.hoplon {:local/root "../../plugins/hoplon"} io.github.babashka/http-server {:git/sha "b38c1f16ad2c618adae2c3b102a5520c261a7dd3"}} :tasks diff --git a/plugins/demo/resources/public/index.html b/plugins/demo/resources/public/index.html index a48dfc4..7f328cc 100644 --- a/plugins/demo/resources/public/index.html +++ b/plugins/demo/resources/public/index.html @@ -1,14 +1,21 @@ - + - + + +

Hello Hoplon!

diff --git a/plugins/hoplon/deps.edn b/plugins/hoplon/deps.edn new file mode 100644 index 0000000..e7aef52 --- /dev/null +++ b/plugins/hoplon/deps.edn @@ -0,0 +1,3 @@ +{:deps + {hoplon/hoplon {:mvn/version "7.5.0"} + io.github.babashka/sci.configs {:git/sha "08bab21643bc0c63a5b99c65193c9d24888270b7"}}} diff --git a/plugins/hoplon/src/scittle/hoplon.cljs b/plugins/hoplon/src/scittle/hoplon.cljs new file mode 100644 index 0000000..46e5a3b --- /dev/null +++ b/plugins/hoplon/src/scittle/hoplon.cljs @@ -0,0 +1,9 @@ +(ns scittle.hoplon + {:no-doc true} + (:require [sci.configs.hoplon.hoplon :refer [config]] + [scittle.core :as scittle])) + +(defn init [] + (scittle/register-plugin! + ::hoplon + config)) diff --git a/plugins/hoplon/src/scittle_plugin.edn b/plugins/hoplon/src/scittle_plugin.edn new file mode 100644 index 0000000..b639edb --- /dev/null +++ b/plugins/hoplon/src/scittle_plugin.edn @@ -0,0 +1,9 @@ +[{:name scittle/hoplon + :namespaces [hoplon.core + hoplon.dom] + :js "./scittle.hoplon.js" + :shadow-config + {:modules + {:scittle.hoplon {:init-fn scittle.hoplon/init + :depends-on #{:scittle :scittle.javelin} + :entries [hoplon.core hoplon.goog]}}}}] diff --git a/plugins/javelin/deps.edn b/plugins/javelin/deps.edn new file mode 100644 index 0000000..135f602 --- /dev/null +++ b/plugins/javelin/deps.edn @@ -0,0 +1,3 @@ +{:deps + {hoplon/javelin {:mvn/version "3.9.3"} + io.github.babashka/sci.configs {:git/sha "08bab21643bc0c63a5b99c65193c9d24888270b7"}}} diff --git a/plugins/javelin/src/scittle/javelin.cljs b/plugins/javelin/src/scittle/javelin.cljs new file mode 100644 index 0000000..7334a2d --- /dev/null +++ b/plugins/javelin/src/scittle/javelin.cljs @@ -0,0 +1,9 @@ +(ns scittle.javelin + {:no-doc true} + (:require [sci.configs.hoplon.javelin :refer [config]] + [scittle.core :as scittle])) + +(defn init [] + (scittle/register-plugin! + ::javelin + config)) diff --git a/plugins/javelin/src/scittle_plugin.edn b/plugins/javelin/src/scittle_plugin.edn new file mode 100644 index 0000000..c34873f --- /dev/null +++ b/plugins/javelin/src/scittle_plugin.edn @@ -0,0 +1,8 @@ +[{:name scittle/javelin + :namespaces [javelin.core] + :js "./scittle.javelin.js" + :shadow-config + {:modules + {:scittle.javelin {:init-fn scittle.javelin/init + :depends-on #{:scittle} + :entries [javelin.core]}}}}]