From 615b85bb96a34713fb376416968da6951ae223b7 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Sun, 23 May 2021 17:23:39 +0200 Subject: [PATCH] update build --- cljs/script.cljs | 4 ++-- index.html | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/cljs/script.cljs b/cljs/script.cljs index fb14901..27b8b45 100644 --- a/cljs/script.cljs +++ b/cljs/script.cljs @@ -1,2 +1,2 @@ -(defn foo [] - (println :foo)) +(defn my-alert2 [] + (js/alert "My alert 2!")) diff --git a/index.html b/index.html index a514aa7..6e61060 100644 --- a/index.html +++ b/index.html @@ -54,7 +54,7 @@ <body> <button onclick="user.myAlert()"> - Click me + Click me! </button> </body> @@ -63,6 +63,14 @@ Click me +

Source from file

+ + When you have a file on your server, say cljs/script.cljs, you can load it using the src attribute: + +
+      <script src="cljs/script.cljs" type="application/x-sci"></script>
+    
+

Reagent plugin

To enable reagent,