diff --git a/.gitignore b/.gitignore index e26d706..f415989 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,3 @@ 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 b2fff67..11763c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,21 +9,7 @@ -- [#114](https://github.com/babashka/scittle/issues/114): Enable source maps ([@jeroenvandijk](https://github.com/jeroenvandijk)) -- [#140](https://github.com/babashka/scittle/issues/140): Enable customizing the nrepl websocket port ([@PEZ](https://github.com/PEZ)) - -## v0.7.28 (2025-09-13) - -- [#137](https://github.com/babashka/scittle/issues/137): fix JS interop with reserved JS keyword (incorrectly munged) by bumping SCI - -## 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)). 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) +## v0.7.25 (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)) diff --git a/README.md b/README.md index 01e1607..52d3130 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,6 @@ release Updates Github pages with new release build. ## Credits Idea by Arne Brasseur a.k.a [plexus](https://github.com/plexus). -Name by Alessandra Sierra (the name occurs first in [this](https://stuartsierra.com/2019/12/21/clojure-start-time-in-2019/) blog post). ## License diff --git a/deps.edn b/deps.edn index f7a5121..0133967 100644 --- a/deps.edn +++ b/deps.edn @@ -1,9 +1,9 @@ {:paths ["src" "resources"] :deps - {org.clojure/clojure {:mvn/version "1.12.2"} + {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 "6758ba028da559c536a06becbbedade7b0ba6448"} + :git/sha "f8015f925f77ec5fd65c776d06345328eccf7e25"} #_{:local/root "../babashka/sci"} reagent/reagent {:mvn/version "1.1.1"} no.cjohansen/replicant {:mvn/version "2025.03.27"} diff --git a/doc/dev.md b/doc/dev.md index b6bd354..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.28` +- `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/js-libraries.md b/doc/js-libraries.md deleted file mode 100644 index 72cafb8..0000000 --- a/doc/js-libraries.md +++ /dev/null @@ -1,49 +0,0 @@ -# Loading JS libraries - -Since `v0.7.28` 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/doc/links.md b/doc/links.md index 0b4181a..98b9734 100644 --- a/doc/links.md +++ b/doc/links.md @@ -1,20 +1,20 @@ -https://cdn.jsdelivr.net/npm/scittle@0.7.28/dist/scittle.js -https://cdn.jsdelivr.net/npm/scittle@0.7.28/dist/scittle.js-interop.js -https://cdn.jsdelivr.net/npm/scittle@0.7.28/dist/scittle.cljs-ajax.js -https://cdn.jsdelivr.net/npm/scittle@0.7.28/dist/scittle.reagent.js -https://cdn.jsdelivr.net/npm/scittle@0.7.28/dist/scittle.re-frame.js -https://cdn.jsdelivr.net/npm/scittle@0.7.28/dist/scittle.replicant.js -https://cdn.jsdelivr.net/npm/scittle@0.7.28/dist/scittle.promesa.js -https://cdn.jsdelivr.net/npm/scittle@0.7.28/dist/scittle.pprint.js -https://cdn.jsdelivr.net/npm/scittle@0.7.28/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 -https://cdn.jsdelivr.net/npm/scittle@0.7.28/dist/dev/scittle.js -https://cdn.jsdelivr.net/npm/scittle@0.7.28/dist/dev/scittle.js-interop.js -https://cdn.jsdelivr.net/npm/scittle@0.7.28/dist/dev/scittle.cljs-ajax.js -https://cdn.jsdelivr.net/npm/scittle@0.7.28/dist/dev/scittle.reagent.js -https://cdn.jsdelivr.net/npm/scittle@0.7.28/dist/dev/scittle.re-frame.js -https://cdn.jsdelivr.net/npm/scittle@0.7.28/dist/dev/scittle.replicant.js -https://cdn.jsdelivr.net/npm/scittle@0.7.28/dist/dev/scittle.promesa.js -https://cdn.jsdelivr.net/npm/scittle@0.7.28/dist/dev/scittle.pprint.js -https://cdn.jsdelivr.net/npm/scittle@0.7.28/dist/dev/scittle.nrepl.js -https://cdn.jsdelivr.net/npm/scittle@0.7.28/dist/dev/scittle.cljs-devtools.js +https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/dev/scittle.js +https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/dev/scittle.js-interop.js +https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/dev/scittle.cljs-ajax.js +https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/dev/scittle.reagent.js +https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/dev/scittle.re-frame.js +https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/dev/scittle.replicant.js +https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/dev/scittle.promesa.js +https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/dev/scittle.pprint.js +https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/dev/scittle.nrepl.js +https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/dev/scittle.cljs-devtools.js diff --git a/doc/nrepl/README.md b/doc/nrepl/README.md index 5541357..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: @@ -42,16 +42,6 @@ you should be able evaluate expressions in `playground.cljs`. See a demo Note that the nREPL server connection stays alive even after the browser window refreshes. -### Custom host address - -By default, the browser will connect to a websocket on the same host as it is loaded -from, using `window.location.hostname`. If you need something else you can specify -that setting the window variable `SCITTLE_NREPL_WEBSOCKET_HOST` like so: - -``` html - -``` - ### CIDER Choose `cider-connect-cljs`, select port `1339`, followed by the `nbb` REPL diff --git a/doc/nrepl/index.html b/doc/nrepl/index.html index 5890a47..96316fe 100644 --- a/doc/nrepl/index.html +++ b/doc/nrepl/index.html @@ -1,9 +1,9 @@ - + - + diff --git a/package-lock.json b/package-lock.json index e5bd260..dad5d8c 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.28" + "version": "0.7.26" }, "node_modules/js-tokens": { "version": "4.0.0", @@ -129,5 +129,5 @@ } } }, - "version": "0.7.28" + "version": "0.7.26" } diff --git a/package.json b/package.json index ab333e8..0b85ba0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "scittle", - "version": "0.7.28", + "version": "0.7.26", "files": [ "dist" ], diff --git a/resources/public/cljs/replicant_tictactoe/game.cljs b/resources/public/cljs/replicant_tictactoe/game.cljs index 9296baf..3f62d7f 100644 --- a/resources/public/cljs/replicant_tictactoe/game.cljs +++ b/resources/public/cljs/replicant_tictactoe/game.cljs @@ -13,13 +13,10 @@ path)) (defn get-winning-path [{:keys [size tics]} y x] - (let [flip-y (fn [y] (- size 1 y))] - (or (winner? tics (mapv #(vector y %) (range 0 size))) - (winner? tics (mapv #(vector % x) (range 0 size))) - (when (= y x) - (winner? tics (mapv #(vector % %) (range 0 size)))) - (when (= (flip-y y) x) - (winner? tics (mapv #(vector (flip-y %) %) (range 0 size))))))) + (or (winner? tics (mapv #(vector y %) (range 0 size))) + (winner? tics (mapv #(vector % x) (range 0 size))) + (when (= y x) + (winner? tics (mapv #(vector % %) (range 0 size)))))) (defn maybe-conclude [game y x] (if-let [path (get-winning-path game y x)] diff --git a/resources/public/codemirror.html b/resources/public/codemirror.html index 800624b..1470da4 100644 --- a/resources/public/codemirror.html +++ b/resources/public/codemirror.html @@ -1,13 +1,13 @@ - + - - - + + + - + + + + - +