2014-10-19 08:26:07 +00:00
|
|
|
(require '[cljx.repl-middleware :as cljx])
|
|
|
|
(reset! @#'cljx/cljx-load-rules {:clj cljx.rules/clj-rules})
|
|
|
|
@@#'cljx/install-cljx-load
|
|
|
|
|
2014-10-12 10:29:48 +00:00
|
|
|
(ns user
|
|
|
|
(:require [grub.core :as system]
|
|
|
|
[clojure.java.io :as io]
|
|
|
|
[clojure.string :as str]
|
|
|
|
[clojure.pprint :refer (pprint)]
|
|
|
|
[clojure.repl :refer :all]
|
|
|
|
[clojure.test :as test]
|
|
|
|
[clojure.tools.namespace.repl :refer (refresh refresh-all)]))
|
|
|
|
|
2014-10-14 19:38:26 +00:00
|
|
|
(clojure.tools.namespace.repl/set-refresh-dirs "src/clj" "target/classes")
|
|
|
|
|
2014-10-12 10:29:48 +00:00
|
|
|
(def system nil)
|
|
|
|
|
|
|
|
(defn start
|
|
|
|
"Starts the current development system."
|
|
|
|
[]
|
2014-10-12 19:57:00 +00:00
|
|
|
(alter-var-root #'system system/start system/dev-system))
|
2014-10-12 10:29:48 +00:00
|
|
|
|
|
|
|
(defn stop
|
|
|
|
"Shuts down and destroys the current development system."
|
|
|
|
[]
|
|
|
|
(alter-var-root #'system
|
|
|
|
(fn [s] (when s (system/stop s)))))
|
|
|
|
|
|
|
|
(defn reset []
|
|
|
|
(stop)
|
|
|
|
(refresh :after 'user/start))
|