Skip to content

Modernize the example project and add a browser + Node tutorial#85

Merged
bbatsov merged 2 commits into
masterfrom
modernize-example
Jun 29, 2026
Merged

Modernize the example project and add a browser + Node tutorial#85
bbatsov merged 2 commits into
masterfrom
modernize-example

Conversation

@bbatsov

@bbatsov bbatsov commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Brings the example into 2026: drops Leiningen/lein-cljsbuild for a deps.edn that builds with cljs.main and pulls Weasel from the in-repo checkout via :local/root, so it always runs against current source. Adds a Node entry point next to the browser one, switches index.html to cljs.main's single self-bootstrapping script, and tidies the cljs namespaces.

The example README is now a step-by-step tutorial covering both a browser REPL (build, serve over http://localhost, connect, evaluate, reconnect-on-reload) and a Node REPL showcasing the native-WebSocket client off the browser. I verified both builds compile and smoke-tested the Node path end to end (the compiled client connects to a Weasel server and evaluates).

Note it serves over http://localhost rather than file:// on purpose - the new Origin check rejects the opaque file:// origin, and Closure's dev-mode loading needs a real origin anyway.

bbatsov added 2 commits June 29, 2026 08:07
Replace the Leiningen/lein-cljsbuild setup with a deps.edn that builds via
cljs.main and pulls Weasel from the in-repo checkout (:local/root), so the
example always runs against current source. Add a Node entry point alongside
the browser one to exercise the native-WebSocket client off the browser, switch
index.html to cljs.main's single self-bootstrapping script, and tidy the cljs
namespaces (idiomatic :require, drop dead side effects).
@bbatsov bbatsov merged commit d5c3dbf into master Jun 29, 2026
1 check passed
@bbatsov bbatsov deleted the modernize-example branch June 29, 2026 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant