diff --git a/.gitignore b/.gitignore index f415989..e26d706 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ gh-pages/ /.clj-kondo/rewrite-clj /plugins/demo/resources/public/js/ .portal +resources/public/test/scratch.html diff --git a/CHANGELOG.md b/CHANGELOG.md index 9bbe01f..eba6bc3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,10 @@ +## 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)) +- Potentially breaking: `(.-foo-bar {})` now behaves as `{}.foo_bar`, i.e. the property or method name is munged. ## v0.7.26 (2025-08-20) diff --git a/deps.edn b/deps.edn index 0133967..06144e1 100644 --- a/deps.edn +++ b/deps.edn @@ -3,7 +3,7 @@ {org.clojure/clojure {:mvn/version "1.11.1"} thheller/shadow-cljs {:mvn/version "3.1.8"} org.babashka/sci {:git/url "https://github.com/babashka/sci" - :git/sha "f8015f925f77ec5fd65c776d06345328eccf7e25"} + :git/sha "893fc8394dafe6c76bed69a5685c59f35dd189db"} #_{:local/root "../babashka/sci"} reagent/reagent {:mvn/version "1.1.1"} no.cjohansen/replicant {:mvn/version "2025.03.27"} diff --git a/doc/js-libraries.md b/doc/js-libraries.md new file mode 100644 index 0000000..a51d065 --- /dev/null +++ b/doc/js-libraries.md @@ -0,0 +1,49 @@ +# Loading JS libraries + +Since `v0.7.27` scittle allows to load libraries from the global enviroment. +This means you can load a library in a ` + + + + + + +``` + +## 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")) + +

JS libraries

+ + To use JavaScript libraries with Scittle, + see README.md +

REPL