From 1be280a478f4162e01dde69cdaf1248f3d0ea33b Mon Sep 17 00:00:00 2001 From: anatoly Date: Sun, 25 Oct 2015 22:08:37 -0400 Subject: [PATCH] start/stop selected states useful for debugging, REPLing, testing --- dev/dev.clj | 8 +++++--- src/mount/mount.clj | 16 +++++++++------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/dev/dev.clj b/dev/dev.clj index c3d79aa..15bea52 100644 --- a/dev/dev.clj +++ b/dev/dev.clj @@ -14,13 +14,15 @@ ;; [clojure.core.async :refer [>!! ! > (all-ns) (mapcat ns-interns) (map second) @@ -75,10 +75,12 @@ (sort-by (comp :order meta) order) (map #(fun % (meta %))))) -(defn start [] - (doall - (bring (find-states) up <))) +(defn start [& states] + (let [states (or states (find-all-states))] + (doall + (bring states up <)))) -(defn stop [] - (doall - (bring (find-states) down >))) +(defn stop [& states] + (let [states (or states (find-all-states))] + (doall + (bring states down >))))