Hi! Is there any way to run state for whole namespace? I have several states in one namespace "helloworld". I would like to point out only name of namespace to run all states in it instead of enumaration every defstate
No, but it could easily be added/programmed by yourself.
Using some internals
(defn states-in-ns [ns-sym]
(let [all (set (map :var (vals @@#'mount.core/meta-state)))]
(filter all (vals (ns-publics ns-sym)))))
(apply mount.core/start (states-in-ns 'my.ns))
there’s actually mount.core/find-all-states
that you can use instead of accessing the private meta-state
@dm3 thanks, I'll try it.