A simple library for hot reloading your Clojure code.
Please note, ClojureScript is deliberately unsupported. Figwheel or Shadow CLJS are probably your best options if you're working on a ClojureScript project. I personally only use this library for ClojureScript-free projects, and Figwheel-main otherwise.
Exceptions and throwables that occur while reloading code will be pretty-printed.
Add this to your deps.edn:
thiru/clj-reloader {:git/url "https://github.com/thiru/clj-reloader"
:sha "<COMMIT SHA>"}
Example of starting the hot code reloader to monitor the src and dev directories:
(require '[reloader.core :as reloader])
(reloader/start ["src" "dev"])
And if you need to stop the hot code reloader:
(reloader/stop)