Hoplon and Javelin plugins

This commit is contained in:
mynomoto 2023-11-19 15:40:59 -03:00
parent f63d50215d
commit 0d9792abc9
8 changed files with 55 additions and 5 deletions

View file

@ -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

View file

@ -1,14 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="/css/style.css">
<!-- <link rel="stylesheet" href="/css/style.css"> -->
<script src="/js/scittle.js" type="application/javascript"></script>
<script src="/js/scittle.datascript.js" type="application/javascript"></script>
<script src="/js/scittle.javelin.js" type="application/javascript"></script>
<script src="/js/scittle.hoplon.js" type="application/javascript"></script>
<script type="application/x-scittle">
(require '[datascript.core :as d])
(prn (ns-publics 'datascript.core))
(require '[hoplon.core :as h])
(require '[javelin.core :as j])
(j/defc title "From Hoplon")
(h/body
(h/h1 (h/text "~{title}")))
</script>
</head>
<body>
<h1>Hello Hoplon!</h1>
</body>
</html>

3
plugins/hoplon/deps.edn Normal file
View file

@ -0,0 +1,3 @@
{:deps
{hoplon/hoplon {:mvn/version "7.5.0"}
io.github.babashka/sci.configs {:git/sha "08bab21643bc0c63a5b99c65193c9d24888270b7"}}}

View file

@ -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))

View file

@ -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]}}}}]

3
plugins/javelin/deps.edn Normal file
View file

@ -0,0 +1,3 @@
{:deps
{hoplon/javelin {:mvn/version "3.9.3"}
io.github.babashka/sci.configs {:git/sha "08bab21643bc0c63a5b99c65193c9d24888270b7"}}}

View file

@ -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))

View file

@ -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]}}}}]