Functions commonly used from a dev
namespace. Recommended usage is like:
(ns dev
(:require [io.dominic.wedge.dev :refer :all]))
Functions commonly used from a `dev` namespace. Recommended usage is like: ``` (ns dev (:require [io.dominic.wedge.dev :refer :all])) ```
(add-dev-system-fixture! lifecycle key f)
Register function to run with changes to the dev system. lifecycle
can be
one of :start-once, :start-always, :stop-once, :stop-always. Those ending in
-once
will only run if the system is actually changing (i.e. not on reset
or suspend), -always
runs on every call to stop/start. key
should be a
globally unique key to identify this fixture. f
should be a function of no
args which will be called when the lifecycle is matched.
Safe to call multiple times, will replace existing functions when doing so.
Register function to run with changes to the dev system. `lifecycle` can be one of :start-once, :start-always, :stop-once, :stop-always. Those ending in `-once` will only run if the system is actually changing (i.e. not on reset or suspend), `-always` runs on every call to stop/start. `key` should be a globally unique key to identify this fixture. `f` should be a function of no args which will be called when the lifecycle is matched. Safe to call multiple times, will replace existing functions when doing so.
(go)
Calls start
. Exists for compatibility with other component libraries.
Calls `start`. Exists for compatibility with other component libraries.
(remove-dev-system-fixture! lifecycle key)
Remove a fixture added with add-dev-system-fixture!
Remove a fixture added with [[add-dev-system-fixture!]]
(reset)
Stop the running system, refresh using tools.namespace, and then start the new system.
Stop the running system, refresh using tools.namespace, and then start the new system.
(set-init! init-fn)
Set the initializer to init-fn. Should be a function which takes no arguments and returns the system config to use for the REPL.
Set the initializer to init-fn. Should be a function which takes no arguments and returns the system config to use for the REPL.
(start)
Stops any existing systems and starts a new one calling the initializer set by set-init!
Stops any existing systems and starts a new one calling the initializer set by set-init!
(stop)
Stop the running system (if running)
Stop the running system (if running)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close