My minimal foundation for a ClojureScript project on Linux/Mac.
- Java
- Homebrew (Mac only; to install the Clojure CLI tools in the project dir)
- Clojure Tools
- Python 3 (optional; to start a simple webserver)
git clone clojurescript-demo
$ cd clojurescript-demo
I like to install the tools in the project directory, mostly because it makes it easier (for me) to keep them up to date.
make install-clojure-tools
If you don't install the Clojure CLI tools this way, then you'll need to update the makefile to point to where your Clojure CLI tools are installed.
If you are on a Mac, and you don't have coreutils installed, you might need to do this first:
brew install coreutils
- makefile
- deps.edn
- config
The makefile provides several useful commands, which can be displayed by running make
(without any arguments).
Start a build process.
- Compile with dev settings.
- Start a REPL socket server.
- Recompile if
src
changes.
$ make dev-proc
Connect to the REPL socket server on port 5555.
In the REPL, which should be in the user ns, eval (browser-repl)
.
Start a webserver.
$ make serve
Open a browser to localhost:9000.
Open browser console.
You should see "ClojureScript demo project started"
Start a build process.
- Compile with dev settings.
- Start a REPL.
- Start a webserver.
- Open a browser tab to point to the webserver.
- Recompile if
src
changes.
make dev-repl
Open browser console.
You should see "ClojureScript demo project started"
Copyright © 2024 Austin Haas Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.