grub-fork/dev/user.clj
Nicholas Kariniemi 8fe22b9a52 Use timestamp tags instead of hashes
- Hashing was slow and we weren't using the hash properties much anyway
2014-10-21 23:25:42 +03:00

32 lines
901 B
Clojure

(require '[cljx.repl-middleware :as cljx])
(reset! @#'cljx/cljx-load-rules {:clj cljx.rules/clj-rules})
@@#'cljx/install-cljx-load
(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)]))
(clojure.tools.namespace.repl/set-refresh-dirs "src/clj" "target/classes")
(def system nil)
(defn start
"Starts the current development system."
[]
(alter-var-root #'system (constantly system/dev-system))
(alter-var-root #'system system/start))
(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))