2016-08-20 21:36:09 +00:00
|
|
|
(ns user
|
|
|
|
(:require [mount.core :as mount]
|
2018-02-20 12:34:42 +00:00
|
|
|
[commiteth.figwheel :refer [start-fw stop-fw cljs]]
|
|
|
|
[clojure.tools.namespace.repl :as repl]))
|
2016-08-20 21:36:09 +00:00
|
|
|
|
2018-02-20 12:34:42 +00:00
|
|
|
(repl/set-refresh-dirs "src" "dev" "test")
|
|
|
|
|
|
|
|
(defn start
|
|
|
|
"Start all the application components"
|
|
|
|
[]
|
2018-01-09 12:11:35 +00:00
|
|
|
(require 'commiteth.core)
|
|
|
|
(mount/start-without (ns-resolve 'commiteth.core 'repl-server)))
|
2016-08-20 21:36:09 +00:00
|
|
|
|
2018-02-20 12:34:42 +00:00
|
|
|
(defn stop
|
|
|
|
"Stop all the application components"
|
|
|
|
[]
|
2018-01-09 12:11:35 +00:00
|
|
|
(require 'commiteth.core)
|
|
|
|
(mount/stop-except (ns-resolve 'commiteth.core 'repl-server)))
|
2016-08-20 21:36:09 +00:00
|
|
|
|
2018-02-20 12:34:42 +00:00
|
|
|
(defn refresh
|
|
|
|
"Reload the latest namespace definitions"
|
|
|
|
[]
|
|
|
|
(repl/refresh))
|
|
|
|
|
|
|
|
(defn reset
|
|
|
|
"Restart application after refreshing namespace definitions"
|
|
|
|
[]
|
|
|
|
(stop)
|
|
|
|
(repl/refresh :after 'user/start))
|
|
|
|
|
2016-08-20 21:36:09 +00:00
|
|
|
(defn restart []
|
2018-02-20 12:34:42 +00:00
|
|
|
"Restart without refreshing namespace definitions"
|
2016-08-20 21:36:09 +00:00
|
|
|
(stop)
|
|
|
|
(start))
|