From 1a6ce3312cd035e99ff1946292e26bdc2beb5489 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Mon, 24 May 2021 11:36:53 +0200 Subject: [PATCH] minor --- resources/public/index.html | 8 +++----- src/sci/script_tag.cljs | 5 +++-- src/sci/script_tag/plugin_reagent.cljs | 8 ++++---- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/resources/public/index.html b/resources/public/index.html index 94741ca..05e33d3 100644 --- a/resources/public/index.html +++ b/resources/public/index.html @@ -54,9 +54,7 @@
       <head>
-  <script src="https://borkdude.github.io/sci-script-tag/js/sci-script-tag.js"
-          type="application/javascript">
-  </script>
+  <script src="https://borkdude.github.io/sci-script-tag/js/sci-script-tag.js" type="application/javascript"></script>
 
   <script type="application/x-sci">
     (defn ^:export my-alert []
@@ -71,8 +69,6 @@
   </button>
 </body>
- - @@ -109,5 +105,7 @@
+ + diff --git a/src/sci/script_tag.cljs b/src/sci/script_tag.cljs index fe271ed..70703a9 100644 --- a/src/sci/script_tag.cljs +++ b/src/sci/script_tag.cljs @@ -50,8 +50,9 @@ (str "(require '[sci.script-tag :refer :all])" s))) -(c/defn merge-ctx [opts] - (swap! ctx sci/merge-opts opts)) +(c/defn register-plugin! [plug-in-name sci-opts] + plug-in-name ;; unused for now + (swap! ctx sci/merge-opts sci-opts)) (c/defn- load-contents [script-tags] (when-first [tag script-tags] diff --git a/src/sci/script_tag/plugin_reagent.cljs b/src/sci/script_tag/plugin_reagent.cljs index 24eb83a..81a29dd 100644 --- a/src/sci/script_tag/plugin_reagent.cljs +++ b/src/sci/script_tag/plugin_reagent.cljs @@ -14,7 +14,7 @@ (def reagent-dom-namespace {'render (sci/copy-var rdom/render rdns)}) -(println :merging) -(st/merge-ctx {:namespaces {'reagent.core reagent-namespace - 'reagent.dom reagent-dom-namespace}}) -(println :done-merging) +(st/register-plugin! + ::reagent + {:namespaces {'reagent.core reagent-namespace + 'reagent.dom reagent-dom-namespace}})