From 3845e9962a9376b12d374698dceee1d2b103f970 Mon Sep 17 00:00:00 2001
From: Michiel Borkent
Date: Wed, 18 Jun 2025 11:19:24 +0200
Subject: [PATCH 01/38] Bump versions
---
CHANGELOG.md | 2 +-
doc/dev.md | 10 +++++-----
doc/links.md | 14 +++++++-------
doc/nrepl/README.md | 2 +-
doc/nrepl/index.html | 4 ++--
resources/public/codemirror.html | 8 ++++----
resources/public/html/cljs-ajax.html | 4 ++--
resources/public/html/export.html | 2 +-
resources/public/html/reagent.html | 4 ++--
resources/public/index.html | 2 +-
10 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0a77d68..daeb199 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,7 +5,7 @@
-
+
diff --git a/doc/dev.md b/doc/dev.md
index 2b87a64..40abc6b 100644
--- a/doc/dev.md
+++ b/doc/dev.md
@@ -90,20 +90,20 @@ To create a new NPM release:
- Prepare version `package.json`, except patch (if anything should change here)
- Run `bb npm-publish`: this will compile, bump patch version, create tag and and push to npm and Github
-- `bb replace-version 0.6.16 0.6.22`
+- `bb replace-version 0.6.16 0.7.23`
- Create Github release with updated links from `doc/links.md`
- `bb gh-pages`
-
+
-
-
+
+
-
+
diff --git a/doc/links.md b/doc/links.md
index a58dd12..c17e320 100644
--- a/doc/links.md
+++ b/doc/links.md
@@ -1,7 +1,7 @@
-https://cdn.jsdelivr.net/npm/scittle@0.6.22/dist/scittle.js
-https://cdn.jsdelivr.net/npm/scittle@0.6.22/dist/scittle.cljs-ajax.js
-https://cdn.jsdelivr.net/npm/scittle@0.6.22/dist/scittle.reagent.js
-https://cdn.jsdelivr.net/npm/scittle@0.6.22/dist/scittle.re-frame.js
-https://cdn.jsdelivr.net/npm/scittle@0.6.22/dist/scittle.promesa.js
-https://cdn.jsdelivr.net/npm/scittle@0.6.22/dist/scittle.pprint.js
-https://cdn.jsdelivr.net/npm/scittle@0.6.22/dist/scittle.nrepl.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.23/dist/scittle.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.23/dist/scittle.cljs-ajax.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.23/dist/scittle.reagent.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.23/dist/scittle.re-frame.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.23/dist/scittle.promesa.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.23/dist/scittle.pprint.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.23/dist/scittle.nrepl.js
diff --git a/doc/nrepl/README.md b/doc/nrepl/README.md
index 01953ef..905bab0 100644
--- a/doc/nrepl/README.md
+++ b/doc/nrepl/README.md
@@ -21,7 +21,7 @@ the normal routine:
``` html
-
+
```
Also include the CLJS file that you want to evaluate with nREPL:
diff --git a/doc/nrepl/index.html b/doc/nrepl/index.html
index d228eed..22524fe 100644
--- a/doc/nrepl/index.html
+++ b/doc/nrepl/index.html
@@ -1,9 +1,9 @@
-
+
-
+
diff --git a/resources/public/codemirror.html b/resources/public/codemirror.html
index d512ebe..2da02b1 100644
--- a/resources/public/codemirror.html
+++ b/resources/public/codemirror.html
@@ -1,13 +1,13 @@
-
+
-
-
-
+
+
+
-
+
+
+
+
-
+
-
-
-
+
+
+
@@ -25,9 +25,9 @@
from cljs/replicant_tictactoe/core.cljs using the
script tag:
-<script type="application/x-scittle" src="cljs/replicant-tictactoe/ui.cljs"></script>
-<script type="application/x-scittle" src="cljs/replicant-tictactoe/game.cljs"></script>
-<script type="application/x-scittle" src="cljs/replicant-tictactoe/core.cljs"></script>
+<script type="application/x-scittle" src="cljs/replicant_tictactoe/ui.cljs"></script>
+<script type="application/x-scittle" src="cljs/replicant_tictactoe/game.cljs"></script>
+<script type="application/x-scittle" src="cljs/replicant_tictactoe/core.cljs"></script>
@@ -39,7 +39,7 @@
(.highlightAll js/hljs)))
(def oreq (js/XMLHttpRequest.))
(.addEventListener oreq "load" set-text)
- (.open oreq "GET" "cljs/replicant-tictactoe/core.cljs")
+ (.open oreq "GET" "cljs/replicant_tictactoe/core.cljs")
(.send oreq)
From a9c0373fe47c92d9c21a351665556070ea306b06 Mon Sep 17 00:00:00 2001
From: Michiel Borkent
Date: Wed, 18 Jun 2025 11:29:50 +0200
Subject: [PATCH 06/38] fix gh pages
---
script/release.clj | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/script/release.clj b/script/release.clj
index f64d85d..4835975 100755
--- a/script/release.clj
+++ b/script/release.clj
@@ -25,7 +25,7 @@
(fs/copy "resources/public/codemirror.html" "gh-pages"
{:replace-existing true})
-
+
(fs/copy "resources/public/replicant_tictactoe.html" "gh-pages"
{:replace-existing true})
@@ -65,8 +65,8 @@
{:replace-existing true}))
(fs/glob cljs-source-dir "*.cljs"))
-(println "Copying dir resources/public/cljs/replicant-tictactoe")
-(fs/copy-tree (fs/file cljs-source-dir "replicant-tictactoe") (fs/file cljs-target-dir "replicant-tictactoe") {:replace-existing true})
+(println "Copying dir resources/public/cljs/replicant_tictactoe")
+(fs/copy-tree (fs/file cljs-source-dir "replicant_tictactoe") (fs/file cljs-target-dir "replicant_tictactoe") {:replace-existing true})
(run! (fn [f]
(println "Copying" (str f))
From c03978105880c06d84f061a2595f6f9a4d55676e Mon Sep 17 00:00:00 2001
From: Chris McCormick
Date: Wed, 2 Jul 2025 14:38:37 +0800
Subject: [PATCH 07/38] Document service worker usage. (#117)
---
README.md | 4 ++++
doc/serviceworker.md | 26 ++++++++++++++++++++++++++
2 files changed, 30 insertions(+)
create mode 100644 doc/serviceworker.md
diff --git a/README.md b/README.md
index a276016..52d3130 100644
--- a/README.md
+++ b/README.md
@@ -29,6 +29,10 @@ babashka or Clojure JVM):
See [doc/nrepl](doc/nrepl).
+### Service worker
+
+See [doc/serviceworker.md](doc/serviceworker.md).
+
## Tasks
Run `bb tasks` to see all available tasks:
diff --git a/doc/serviceworker.md b/doc/serviceworker.md
new file mode 100644
index 0000000..1048f77
--- /dev/null
+++ b/doc/serviceworker.md
@@ -0,0 +1,26 @@
+# Scittle in a service worker
+
+You can use Scittle to bootstrap a ClojureScript based service worker.
+
+Put the following code into e.g. `scittle-sw.js` to create a JavaScript based service worker, load Scittle, then fetch your script and eval it.
+
+```javascript
+importScripts("scittle.min.js");
+
+const request = await fetch("sw.cljs");
+const text = await request.text();
+const result = scittle.core.eval_string(text);
+```
+
+Then load `scittle-sw.js` in your HTML:
+
+```html
+
+```
+
+This will load `sw.cljs` and eval it in the context of the service worker.
+
+A ready-made example can be found at [chr15m/scittle-template-serviceworker](https://github.com/chr15m/scittle-template-serviceworker).
From 9a83349d691b4cbcaa498984e7b278a6b093eb2e Mon Sep 17 00:00:00 2001
From: Jeroen van Dijk <27645+jeroenvandijk@users.noreply.github.com>
Date: Wed, 9 Jul 2025 16:24:35 +0300
Subject: [PATCH 08/38] Add goog.string/format #118 (#119)
* Add goog.string/format #118
Also add empty goog.string.format for Cljs compatibility
* Update changelog
---
CHANGELOG.md | 2 ++
src/scittle/core.cljs | 5 ++++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0847390..431fc4f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,8 @@
+- [#118](https://github.com/babashka/scittle/issues/118): add `goog.string/format` ([@jeroenvandijk](https://github.com/jeroenvandijk))
+
## v0.7.23 (2025-06-18)
- [#107](https://github.com/babashka/scittle/issues/107): add `replicant` plugin ([@jeroenvandijk](https://github.com/jeroenvandijk))
diff --git a/src/scittle/core.cljs b/src/scittle/core.cljs
index ee5ec27..6ba88ad 100644
--- a/src/scittle/core.cljs
+++ b/src/scittle/core.cljs
@@ -3,6 +3,7 @@
(:require [cljs.reader :refer [read-string]]
[goog.object :as gobject]
[goog.string :as gstring]
+ [goog.string.format]
[sci.core :as sci]
[sci.ctx-store :as store]
[sci.impl.unrestrict]
@@ -46,7 +47,9 @@
'abs (sci/copy-var abs cljns)}
'goog.object {'set gobject/set
'get gobject/get}
- 'goog.string {'htmlEscape gstring/htmlEscape}
+ 'goog.string {'format gstring/format
+ 'htmlEscape gstring/htmlEscape}
+ 'goog.string.format {} ;; For cljs compatibility
'sci.core {'stacktrace sci/stacktrace
'format-stacktrace sci/format-stacktrace}})
From f92e23d8f279bcc466b07903926d62fbdc3395ac Mon Sep 17 00:00:00 2001
From: Jeroen van Dijk <27645+jeroenvandijk@users.noreply.github.com>
Date: Mon, 14 Jul 2025 19:34:23 +0300
Subject: [PATCH 09/38] Add dataspex plugin (#122)
---
CHANGELOG.md | 1 +
deps.edn | 3 ++-
plugins/datascript/deps.edn | 3 ++-
plugins/dataspex/deps.edn | 8 ++++++++
plugins/dataspex/src/scittle/dataspex.cljs | 9 +++++++++
plugins/dataspex/src/scittle_plugin.edn | 8 ++++++++
plugins/demo/bb.edn | 1 +
plugins/hoplon/deps.edn | 3 ++-
plugins/javelin/deps.edn | 3 ++-
9 files changed, 35 insertions(+), 4 deletions(-)
create mode 100644 plugins/dataspex/deps.edn
create mode 100644 plugins/dataspex/src/scittle/dataspex.cljs
create mode 100644 plugins/dataspex/src/scittle_plugin.edn
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 431fc4f..74bb2bf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@
+- [#121](https://github.com/babashka/scittle/issues/121): add `cjohansen/dataspex` plugin ([@jeroenvandijk](https://github.com/jeroenvandijk))
- [#118](https://github.com/babashka/scittle/issues/118): add `goog.string/format` ([@jeroenvandijk](https://github.com/jeroenvandijk))
## v0.7.23 (2025-06-18)
diff --git a/deps.edn b/deps.edn
index 96ada15..fa33be6 100644
--- a/deps.edn
+++ b/deps.edn
@@ -21,7 +21,8 @@
io.github.babashka/sci.configs
#_{:local/root "/Users/borkdude/dev/sci.configs"}
{:git/url "https://github.com/babashka/sci.configs"
- :git/sha "1ade6f94a2902211bed1f876472571da0c5e7278"}}
+ :git/sha "aa84a1b4f1fe45735e5b748769309fc842f737c1"
+ :exclusions [org.babashka/sci]}}
:aliases
{:dev
{:extra-paths ["dev"]
diff --git a/plugins/datascript/deps.edn b/plugins/datascript/deps.edn
index 1454ae1..467f4cd 100644
--- a/plugins/datascript/deps.edn
+++ b/plugins/datascript/deps.edn
@@ -1,3 +1,4 @@
{:deps
{datascript/datascript {:mvn/version "1.3.12"}
- io.github.babashka/sci.configs {:git/sha "33bd51e53700b224b4cb5bda59eb21b62f962745"}}}
+ io.github.babashka/sci.configs {:git/sha "aa84a1b4f1fe45735e5b748769309fc842f737c1"
+ :exclusions [org.babashka/sci]}}}
diff --git a/plugins/dataspex/deps.edn b/plugins/dataspex/deps.edn
new file mode 100644
index 0000000..badf11e
--- /dev/null
+++ b/plugins/dataspex/deps.edn
@@ -0,0 +1,8 @@
+{:deps
+ {no.cjohansen/dataspex {:git/url "https://github.com/cjohansen/dataspex"
+ :git/sha "02112200651c2bd932907bb69fba1ff50b881741"
+ :exclusions [ring/ring-core
+ ring/ring-jetty-adapter
+ com.cognitect/transit-clj]}
+ io.github.babashka/sci.configs {:git/sha "aa84a1b4f1fe45735e5b748769309fc842f737c1"
+ :exclusions [org.babashka/sci]}}}
diff --git a/plugins/dataspex/src/scittle/dataspex.cljs b/plugins/dataspex/src/scittle/dataspex.cljs
new file mode 100644
index 0000000..66b3908
--- /dev/null
+++ b/plugins/dataspex/src/scittle/dataspex.cljs
@@ -0,0 +1,9 @@
+(ns scittle.dataspex
+ {:no-doc true}
+ (:require [sci.configs.cjohansen.dataspex :refer [config]]
+ [scittle.core :as scittle]))
+
+(defn init []
+ (scittle/register-plugin!
+ ::dataspex
+ config))
diff --git a/plugins/dataspex/src/scittle_plugin.edn b/plugins/dataspex/src/scittle_plugin.edn
new file mode 100644
index 0000000..af629e2
--- /dev/null
+++ b/plugins/dataspex/src/scittle_plugin.edn
@@ -0,0 +1,8 @@
+[{:name scittle/dataspex
+ :namespaces [dataspex.core]
+ :js "./scittle.dataspex.js"
+ :shadow-config
+ {:modules
+ {:scittle.dataspex {:init-fn scittle.dataspex/init
+ :depends-on #{:scittle :scittle.datascript}
+ :entries [dataspex.core]}}}}]
diff --git a/plugins/demo/bb.edn b/plugins/demo/bb.edn
index 86170d0..e7486c2 100644
--- a/plugins/demo/bb.edn
+++ b/plugins/demo/bb.edn
@@ -1,6 +1,7 @@
{:deps {io.github.babashka/scittle.build {:local/root "../../build"}
;; datascript plugin
; io.github.babashka/scittle.datascript {:local/root "../../plugins/datascript"}
+ io.github.babashka/scittle.dataspex {:local/root "../../plugins/dataspex"}
io.github.babashka/scittle.javelin {:local/root "../../plugins/javelin"}
io.github.babashka/scittle.hoplon {:local/root "../../plugins/hoplon"}
io.github.babashka/http-server
diff --git a/plugins/hoplon/deps.edn b/plugins/hoplon/deps.edn
index e7aef52..0eab577 100644
--- a/plugins/hoplon/deps.edn
+++ b/plugins/hoplon/deps.edn
@@ -1,3 +1,4 @@
{:deps
{hoplon/hoplon {:mvn/version "7.5.0"}
- io.github.babashka/sci.configs {:git/sha "08bab21643bc0c63a5b99c65193c9d24888270b7"}}}
+ io.github.babashka/sci.configs {:git/sha "aa84a1b4f1fe45735e5b748769309fc842f737c1"
+ :exclusions [org.babashka/sci]}}}
diff --git a/plugins/javelin/deps.edn b/plugins/javelin/deps.edn
index 135f602..f4b4533 100644
--- a/plugins/javelin/deps.edn
+++ b/plugins/javelin/deps.edn
@@ -1,3 +1,4 @@
{:deps
{hoplon/javelin {:mvn/version "3.9.3"}
- io.github.babashka/sci.configs {:git/sha "08bab21643bc0c63a5b99c65193c9d24888270b7"}}}
+ io.github.babashka/sci.configs {:git/sha "aa84a1b4f1fe45735e5b748769309fc842f737c1"
+ :exclusions [org.babashka/sci]}}}
From e8670cb1c8bad5c037b8b032fbbe8ab489e86b0b Mon Sep 17 00:00:00 2001
From: Michiel Borkent
Date: Mon, 21 Jul 2025 11:49:23 +0200
Subject: [PATCH 10/38] minor
---
src/scittle/nrepl.cljs | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/scittle/nrepl.cljs b/src/scittle/nrepl.cljs
index bfea685..08cb7bb 100644
--- a/src/scittle/nrepl.cljs
+++ b/src/scittle/nrepl.cljs
@@ -11,7 +11,6 @@
(new js/WebSocket (ws-url (.-hostname (.-location js/window)) ws-port "_nrepl"))))
(when-let [ws (nrepl-server/nrepl-websocket)]
- (prn :ws ws)
(set! (.-onmessage ws)
(fn [event]
(nrepl-server/handle-nrepl-message (edn/read-string (.-data event)))))
From c4d7e74d2d77d0b16ac6d636c9e4999befdddbf2 Mon Sep 17 00:00:00 2001
From: Michiel Borkent
Date: Mon, 21 Jul 2025 14:36:32 +0200
Subject: [PATCH 11/38] Bump sci.nrepl
---
doc/nrepl/bb.edn | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/doc/nrepl/bb.edn b/doc/nrepl/bb.edn
index e4cf885..fdd4518 100644
--- a/doc/nrepl/bb.edn
+++ b/doc/nrepl/bb.edn
@@ -1,5 +1,6 @@
{:deps {io.github.babashka/sci.nrepl
- {:git/sha "2f8a9ed2d39a1b09d2b4d34d95494b56468f4a23"}
+ #_{:local/root "/Users/borkdude/dev/sci.nrepl"}
+ {:git/sha "4f7f6d652a71b5bdc0c110313a4908d956e7a97d"}
io.github.babashka/http-server
{:git/sha "b38c1f16ad2c618adae2c3b102a5520c261a7dd3"}}
:tasks {http-server {:doc "Starts http server for serving static files"
From c57a5f9285c6cf32985a126a4ae5774755e787ca Mon Sep 17 00:00:00 2001
From: Michiel Borkent
Date: Tue, 12 Aug 2025 20:29:50 +0200
Subject: [PATCH 12/38] Bump SCI: support set! syntax
---
.gitignore | 1 +
CHANGELOG.md | 1 +
deps.edn | 2 +-
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index 58fe583..f415989 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,3 +17,4 @@ gh-pages/
/.clj-kondo/.cache
/.clj-kondo/rewrite-clj
/plugins/demo/resources/public/js/
+.portal
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 74bb2bf..5d166ea 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,7 @@
- [#121](https://github.com/babashka/scittle/issues/121): add `cjohansen/dataspex` plugin ([@jeroenvandijk](https://github.com/jeroenvandijk))
- [#118](https://github.com/babashka/scittle/issues/118): add `goog.string/format` ([@jeroenvandijk](https://github.com/jeroenvandijk))
+- Support alternative `(set! #js {} -a 1)` CLJS syntax (by bumping SCI)
## v0.7.23 (2025-06-18)
diff --git a/deps.edn b/deps.edn
index fa33be6..fda2968 100644
--- a/deps.edn
+++ b/deps.edn
@@ -3,7 +3,7 @@
{org.clojure/clojure {:mvn/version "1.11.1"}
thheller/shadow-cljs {:mvn/version "2.20.15"}
org.babashka/sci {:git/url "https://github.com/babashka/sci"
- :git/sha "87fa2d2648ef809e8c8c87279c51961dca41ed4d"}
+ :git/sha "9522bdadafcfbc5b86e3f37117df62634a9d923e"}
#_{:local/root "../babashka/sci"}
reagent/reagent {:mvn/version "1.1.1"}
no.cjohansen/replicant {:mvn/version "2025.03.27"}
From cb968d06e3d9be335786fea707e576d48ecad154 Mon Sep 17 00:00:00 2001
From: Michiel Borkent
Date: Wed, 20 Aug 2025 14:58:23 +0200
Subject: [PATCH 13/38] Scittle dev (#127)
---
bb.edn | 8 +++++---
build/src/scittle/build.clj | 13 ++++++++++++-
deps.edn | 5 +++--
resources/public/index_text.html | 13 +++++++++++++
shadow-cljs.edn | 8 ++++++--
src/scittle/cljs_devtools.cljs | 6 ++++++
6 files changed, 45 insertions(+), 8 deletions(-)
create mode 100644 resources/public/index_text.html
create mode 100644 src/scittle/cljs_devtools.cljs
diff --git a/bb.edn b/bb.edn
index bc4f02c..f76e437 100644
--- a/bb.edn
+++ b/bb.edn
@@ -44,9 +44,11 @@
:depends [prod]
:task (do
(fs/delete-tree "dist")
- (fs/create-dirs "dist")
- (run! (fn [f] (fs/copy f "dist"))
- (fs/glob "resources/public/js" "*.js")))}
+ (fs/create-dirs "dist/dev")
+ (run! (fn [f] (fs/copy f "dist" {:replace-existing true}))
+ (fs/glob "resources/public/js" "*.{js,js.map}"))
+ (run! (fn [f] (fs/copy f "dist/dev" {:replace-existing true}))
+ (fs/glob "resources/public/js/dev" "*.{js,js.map}")))}
bump-version {:doc "Bumps package.json and pushes new git tag"
:task (do (shell "npm version patch")
diff --git a/build/src/scittle/build.clj b/build/src/scittle/build.clj
index 1e17a37..879d05c 100644
--- a/build/src/scittle/build.clj
+++ b/build/src/scittle/build.clj
@@ -69,4 +69,15 @@
* :action - compile action, defaults to release, but may also be compile or watch"
[{:keys [action
args] :or {action "release"}}]
- (build* (format "-M -m shadow.cljs.devtools.cli --force-spawn %s main %s" action (str/join " " args))))
+ (build* (format "-M -m shadow.cljs.devtools.cli --force-spawn %s main %s" action (str/join " " args)))
+ (when (= "release" action)
+ (println "Also building dev release build")
+ (build* (format "-M -m shadow.cljs.devtools.cli --force-spawn %s main %s %s"
+ action
+ "--config-merge '{:compiler-options {:optimizations :simple
+ :pretty-print true
+ :pseudo-names true}
+ :output-dir \"resources/public/js/dev\"
+ :modules {:scittle.cljs-devtools.dev {:entries [scittle.cljs-devtools]
+ :depends-on #{:scittle}}}}'"
+ (str/join " " args)))))
diff --git a/deps.edn b/deps.edn
index fda2968..a4ecb60 100644
--- a/deps.edn
+++ b/deps.edn
@@ -1,7 +1,7 @@
{:paths ["src" "resources"]
:deps
{org.clojure/clojure {:mvn/version "1.11.1"}
- thheller/shadow-cljs {:mvn/version "2.20.15"}
+ thheller/shadow-cljs {:mvn/version "3.1.8"}
org.babashka/sci {:git/url "https://github.com/babashka/sci"
:git/sha "9522bdadafcfbc5b86e3f37117df62634a9d923e"}
#_{:local/root "../babashka/sci"}
@@ -22,7 +22,8 @@
#_{:local/root "/Users/borkdude/dev/sci.configs"}
{:git/url "https://github.com/babashka/sci.configs"
:git/sha "aa84a1b4f1fe45735e5b748769309fc842f737c1"
- :exclusions [org.babashka/sci]}}
+ :exclusions [org.babashka/sci]}
+ binaryage/devtools {:mvn/version "1.0.7"}}
:aliases
{:dev
{:extra-paths ["dev"]
diff --git a/resources/public/index_text.html b/resources/public/index_text.html
new file mode 100644
index 0000000..c5e58c0
--- /dev/null
+++ b/resources/public/index_text.html
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/shadow-cljs.edn b/shadow-cljs.edn
index 8040d70..7b6d8c4 100644
--- a/shadow-cljs.edn
+++ b/shadow-cljs.edn
@@ -6,7 +6,11 @@
:builds
{:main
- {:target :browser
+ {;; for dev build
+ #_#_:compiler-options {:optimizations :simple
+ :pretty-print true
+ :pseudo-names true}
+ :target :browser
:js-options
{:resolve {"react" {:target :global
:global "React"}
@@ -32,5 +36,5 @@
:scittle.cljs-ajax {:entries [scittle.cljs-ajax]
:depends-on #{:scittle}}}
:build-hooks [(shadow.cljs.build-report/hook)]
- :output-dir "resources/public/js"
+ :output-dir "resources/public/js" ;; + "/dev" for dev build
:devtools {:repl-pprint true}}}}
diff --git a/src/scittle/cljs_devtools.cljs b/src/scittle/cljs_devtools.cljs
new file mode 100644
index 0000000..cbe2082
--- /dev/null
+++ b/src/scittle/cljs_devtools.cljs
@@ -0,0 +1,6 @@
+(ns scittle.cljs-devtools
+ (:require [devtools.core :as devtools]))
+
+(devtools/set-pref! :disable-advanced-mode-check true)
+
+(devtools/install!)
From 04df449d6f3b7fea290b6955285d57a839decc43 Mon Sep 17 00:00:00 2001
From: Michiel Borkent
Date: Wed, 20 Aug 2025 15:04:48 +0200
Subject: [PATCH 14/38] changelog
---
CHANGELOG.md | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5d166ea..01e22e7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,9 +9,13 @@
+## v0.7.24 (2025-08-20)
+
- [#121](https://github.com/babashka/scittle/issues/121): add `cjohansen/dataspex` plugin ([@jeroenvandijk](https://github.com/jeroenvandijk))
- [#118](https://github.com/babashka/scittle/issues/118): add `goog.string/format` ([@jeroenvandijk](https://github.com/jeroenvandijk))
- Support alternative `(set! #js {} -a 1)` CLJS syntax (by bumping SCI)
+- Add source maps to distribution
+- Add dev versions of all modules in the `dev` folder of the distribution + a `dev/scitte.cljs-devtools.js` module
## v0.7.23 (2025-06-18)
From 982ffadaeaa63c8d78c7fd27041dfc368e404066 Mon Sep 17 00:00:00 2001
From: Michiel Borkent
Date: Wed, 20 Aug 2025 15:06:30 +0200
Subject: [PATCH 15/38] 0.7.24
---
package-lock.json | 4 ++--
package.json | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 074b6c0..8b5e900 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -8,7 +8,7 @@
"react": "17.0.1",
"react-dom": "17.0.1"
},
- "version": "0.7.23"
+ "version": "0.7.24"
},
"node_modules/js-tokens": {
"version": "4.0.0",
@@ -129,5 +129,5 @@
}
}
},
- "version": "0.7.23"
+ "version": "0.7.24"
}
diff --git a/package.json b/package.json
index ac66b4e..2da8870 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "scittle",
- "version": "0.7.23",
+ "version": "0.7.24",
"files": [
"dist"
],
From 1857a18ee90c35824c89c4bee3b1a729a733e331 Mon Sep 17 00:00:00 2001
From: Michiel Borkent
Date: Wed, 20 Aug 2025 15:07:36 +0200
Subject: [PATCH 16/38] bump version
---
doc/dev.md | 10 +++++-----
doc/links.md | 18 +++++++++---------
doc/nrepl/README.md | 2 +-
doc/nrepl/index.html | 4 ++--
resources/public/codemirror.html | 8 ++++----
resources/public/html/cljs-ajax.html | 4 ++--
resources/public/html/export.html | 2 +-
resources/public/html/reagent.html | 4 ++--
resources/public/index.html | 2 +-
9 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/doc/dev.md b/doc/dev.md
index 40abc6b..9c48c8c 100644
--- a/doc/dev.md
+++ b/doc/dev.md
@@ -90,20 +90,20 @@ To create a new NPM release:
- Prepare version `package.json`, except patch (if anything should change here)
- Run `bb npm-publish`: this will compile, bump patch version, create tag and and push to npm and Github
-- `bb replace-version 0.6.16 0.7.23`
+- `bb replace-version 0.6.16 0.7.24`
- Create Github release with updated links from `doc/links.md`
- `bb gh-pages`
-
+
-
-
+
+
-
+
diff --git a/doc/links.md b/doc/links.md
index 0a0f4d8..a3ba99f 100644
--- a/doc/links.md
+++ b/doc/links.md
@@ -1,9 +1,9 @@
-https://cdn.jsdelivr.net/npm/scittle@0.7.23/dist/scittle.js
-https://cdn.jsdelivr.net/npm/scittle@0.7.23/dist/scittle.js-interop.js
-https://cdn.jsdelivr.net/npm/scittle@0.7.23/dist/scittle.cljs-ajax.js
-https://cdn.jsdelivr.net/npm/scittle@0.7.23/dist/scittle.reagent.js
-https://cdn.jsdelivr.net/npm/scittle@0.7.23/dist/scittle.re-frame.js
-https://cdn.jsdelivr.net/npm/scittle@0.7.23/dist/scittle.replicant.js
-https://cdn.jsdelivr.net/npm/scittle@0.7.23/dist/scittle.promesa.js
-https://cdn.jsdelivr.net/npm/scittle@0.7.23/dist/scittle.pprint.js
-https://cdn.jsdelivr.net/npm/scittle@0.7.23/dist/scittle.nrepl.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/scittle.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/scittle.js-interop.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/scittle.cljs-ajax.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/scittle.reagent.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/scittle.re-frame.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/scittle.replicant.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/scittle.promesa.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/scittle.pprint.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/scittle.nrepl.js
diff --git a/doc/nrepl/README.md b/doc/nrepl/README.md
index 905bab0..49ab456 100644
--- a/doc/nrepl/README.md
+++ b/doc/nrepl/README.md
@@ -21,7 +21,7 @@ the normal routine:
``` html
-
+
```
Also include the CLJS file that you want to evaluate with nREPL:
diff --git a/doc/nrepl/index.html b/doc/nrepl/index.html
index 22524fe..96316fe 100644
--- a/doc/nrepl/index.html
+++ b/doc/nrepl/index.html
@@ -1,9 +1,9 @@
-
+
-
+
diff --git a/resources/public/codemirror.html b/resources/public/codemirror.html
index 2da02b1..1470da4 100644
--- a/resources/public/codemirror.html
+++ b/resources/public/codemirror.html
@@ -1,13 +1,13 @@
-
+
-
-
-
+
+
+
-
+
+
+
+
-
+
-
+
```
Also include the CLJS file that you want to evaluate with nREPL:
diff --git a/doc/nrepl/index.html b/doc/nrepl/index.html
index 96316fe..82a903b 100644
--- a/doc/nrepl/index.html
+++ b/doc/nrepl/index.html
@@ -1,9 +1,9 @@
-
+
-
+
diff --git a/resources/public/codemirror.html b/resources/public/codemirror.html
index 1470da4..417c977 100644
--- a/resources/public/codemirror.html
+++ b/resources/public/codemirror.html
@@ -1,13 +1,13 @@
-
+
-
-
-
+
+
+
-
+
+
+
+
-
+
+
+
+
+
+
+
+```
+
+## ES modules
+
+The async nature of ES modules makes them a litte bit more difficult to work
+with in scittle. You need to disable automatic evaluation of script tags first
+using `scittle.core.disable_auto_eval()`. In a `module` type `
+
+
+
+
+
+
+
+```
diff --git a/resources/public/index.html b/resources/public/index.html
index 8645ebe..670d821 100644
--- a/resources/public/index.html
+++ b/resources/public/index.html
@@ -160,6 +160,12 @@
(js/console.log "In cljs"))
+
+
+
+ To use JavaScript libraries with Scittle,
+ see README.md
+
From c48f9868c6d5ee9fbc4e796a937cef3233fb5a00 Mon Sep 17 00:00:00 2001
From: Michiel Borkent
Date: Thu, 21 Aug 2025 15:02:29 +0200
Subject: [PATCH 25/38] changelog
---
CHANGELOG.md | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index eba6bc3..495c622 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,7 +11,9 @@
## v0.7.27 (2025-08-21)
-- [#95](https://github.com/babashka/scittle/issues/121): support string requires of `globalThis` js deps ([@chr15m](https://github.com/chr15m))
+- [#95](https://github.com/babashka/scittle/issues/121): support string requires
+ of `globalThis` js deps ([@chr15m](https://github.com/chr15m)). See
+ [docs](https://github.com/babashka/scittle/blob/main/doc/js-libraries.md).
- Potentially breaking: `(.-foo-bar {})` now behaves as `{}.foo_bar`, i.e. the property or method name is munged.
## v0.7.26 (2025-08-20)
From 6b56464bd67c2a65de93270f5b3ab6d483260ffd Mon Sep 17 00:00:00 2001
From: Michiel Borkent
Date: Thu, 21 Aug 2025 15:03:00 +0200
Subject: [PATCH 26/38] 0.7.27
---
package-lock.json | 4 ++--
package.json | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index dad5d8c..9408bff 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -8,7 +8,7 @@
"react": "17.0.1",
"react-dom": "17.0.1"
},
- "version": "0.7.26"
+ "version": "0.7.27"
},
"node_modules/js-tokens": {
"version": "4.0.0",
@@ -129,5 +129,5 @@
}
}
},
- "version": "0.7.26"
+ "version": "0.7.27"
}
diff --git a/package.json b/package.json
index 0b85ba0..71d9dbd 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "scittle",
- "version": "0.7.26",
+ "version": "0.7.27",
"files": [
"dist"
],
From 9e1feb81af87f5d79269cddef9df007408496788 Mon Sep 17 00:00:00 2001
From: Michiel Borkent
Date: Thu, 21 Aug 2025 15:03:34 +0200
Subject: [PATCH 27/38] version
---
doc/dev.md | 10 ++++----
doc/links.md | 38 ++++++++++++++--------------
doc/nrepl/README.md | 2 +-
doc/nrepl/index.html | 4 +--
resources/public/codemirror.html | 8 +++---
resources/public/html/cljs-ajax.html | 4 +--
resources/public/html/export.html | 2 +-
resources/public/html/reagent.html | 4 +--
resources/public/index.html | 2 +-
9 files changed, 37 insertions(+), 37 deletions(-)
diff --git a/doc/dev.md b/doc/dev.md
index c4447b6..b3c9924 100644
--- a/doc/dev.md
+++ b/doc/dev.md
@@ -90,20 +90,20 @@ To create a new NPM release:
- Prepare version `package.json`, except patch (if anything should change here)
- Run `bb npm-publish`: this will compile, bump patch version, create tag and and push to npm and Github
-- `bb replace-version 0.6.16 0.7.26`
+- `bb replace-version 0.6.16 0.7.27`
- Create Github release with updated links from `doc/links.md`
- `bb gh-pages`
-
+
-
-
+
+
-
+
diff --git a/doc/links.md b/doc/links.md
index 9943b02..ce5f490 100644
--- a/doc/links.md
+++ b/doc/links.md
@@ -1,20 +1,20 @@
-https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/scittle.js
-https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/scittle.js-interop.js
-https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/scittle.cljs-ajax.js
-https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/scittle.reagent.js
-https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/scittle.re-frame.js
-https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/scittle.replicant.js
-https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/scittle.promesa.js
-https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/scittle.pprint.js
-https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/scittle.nrepl.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.js-interop.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.cljs-ajax.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.reagent.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.re-frame.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.replicant.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.promesa.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.pprint.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.nrepl.js
-https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/dev/scittle.js
-https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/dev/scittle.js-interop.js
-https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/dev/scittle.cljs-ajax.js
-https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/dev/scittle.reagent.js
-https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/dev/scittle.re-frame.js
-https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/dev/scittle.replicant.js
-https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/dev/scittle.promesa.js
-https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/dev/scittle.pprint.js
-https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/dev/scittle.nrepl.js
-https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/dev/scittle.cljs-devtools.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.js-interop.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.cljs-ajax.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.reagent.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.re-frame.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.replicant.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.promesa.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.pprint.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.nrepl.js
+https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.cljs-devtools.js
diff --git a/doc/nrepl/README.md b/doc/nrepl/README.md
index f3dbe26..4414aa9 100644
--- a/doc/nrepl/README.md
+++ b/doc/nrepl/README.md
@@ -21,7 +21,7 @@ the normal routine:
``` html
-
+
```
Also include the CLJS file that you want to evaluate with nREPL:
diff --git a/doc/nrepl/index.html b/doc/nrepl/index.html
index 82a903b..7a8e80e 100644
--- a/doc/nrepl/index.html
+++ b/doc/nrepl/index.html
@@ -1,9 +1,9 @@
-
+
-
+
diff --git a/resources/public/codemirror.html b/resources/public/codemirror.html
index 417c977..b936266 100644
--- a/resources/public/codemirror.html
+++ b/resources/public/codemirror.html
@@ -1,13 +1,13 @@
-
+
-
-
-
+
+
+
-
+
+
+
+
-
+
+
+
-
+
```
Also include the CLJS file that you want to evaluate with nREPL:
diff --git a/doc/nrepl/index.html b/doc/nrepl/index.html
index 7a8e80e..5890a47 100644
--- a/doc/nrepl/index.html
+++ b/doc/nrepl/index.html
@@ -1,9 +1,9 @@
-
+
-
+
diff --git a/resources/public/codemirror.html b/resources/public/codemirror.html
index b936266..800624b 100644
--- a/resources/public/codemirror.html
+++ b/resources/public/codemirror.html
@@ -1,13 +1,13 @@
-
+
-
-
-
+
+
+
-
+
+
+
+
-
+
+```
+
### CIDER
Choose `cider-connect-cljs`, select port `1339`, followed by the `nbb` REPL
diff --git a/src/scittle/nrepl.cljs b/src/scittle/nrepl.cljs
index 08cb7bb..ec4c38c 100644
--- a/src/scittle/nrepl.cljs
+++ b/src/scittle/nrepl.cljs
@@ -8,7 +8,9 @@
(when-let [ws-port (.-SCITTLE_NREPL_WEBSOCKET_PORT js/window)]
(set! (.-ws_nrepl js/window)
- (new js/WebSocket (ws-url (.-hostname (.-location js/window)) ws-port "_nrepl"))))
+ (new js/WebSocket (ws-url (or (.-SCITTLE_NREPL_WEBSOCKET_HOST js/window)
+ (.-hostname (.-location js/window)))
+ ws-port "_nrepl"))))
(when-let [ws (nrepl-server/nrepl-websocket)]
(set! (.-onmessage ws)
From f72c1c163aeddcb3451becad3c19d6482751f404 Mon Sep 17 00:00:00 2001
From: FrankS
Date: Tue, 9 Dec 2025 13:11:25 -0800
Subject: [PATCH 38/38] Expose cljs.core/Cons in SCI config (#142)
This allows (instance? cljs.core/Cons x) to work in Scittle code.
The Cons type exists in the compiled ClojureScript runtime but was not
exposed by name in SCI's symbol table. Libraries like Trove need this
for type checking in their const-form? function.
---
src/scittle/core.cljs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/scittle/core.cljs b/src/scittle/core.cljs
index 6a7ac60..c603d9c 100644
--- a/src/scittle/core.cljs
+++ b/src/scittle/core.cljs
@@ -44,7 +44,8 @@
'NaN? (sci/copy-var NaN? cljns)
'infinite? (sci/copy-var infinite? cljns)
'iteration (sci/copy-var iteration cljns)
- 'abs (sci/copy-var abs cljns)}
+ 'abs (sci/copy-var abs cljns)
+ 'Cons cljs.core/Cons}
'goog.object {'set gobject/set
'get gobject/get}
'goog.string {'format gstring/format