This is a libary to help reload clj files automatically when they change.
(require '[com.github.clojure.dev-reload :as reload])
(reload/start {:dirs ["src"]}))
This will watch files changes in the src directory and reload them.
You can define a function with metadata :on-load
in the namespace, then this function will be called after the namespace is reloaded.
You can use the optiong :after-reload
when starting the reloader. eg:
(reload/start {:dirs ["src"]
:after-reload (fn [] (println "reloaded!"))}))
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
Ctrl+k | Jump to recent docs |
← | Move to previous article |
→ | Move to next article |
Ctrl+/ | Jump to the search field |