re-natal/resources/user.clj

26 lines
701 B
Clojure
Raw Permalink Normal View History

(ns user
(:use [figwheel-sidecar.repl-api :as ra]))
2015-12-15 18:08:18 +00:00
;; This namespace is loaded automatically by nREPL
;; read project.clj to get build configs
(def profiles (->> "project.clj"
slurp
read-string
(drop-while #(not= % :profiles))
(apply hash-map)
:profiles))
(def cljs-builds (get-in profiles [:dev :cljsbuild :builds]))
(defn start-figwheel
"Start figwheel for one or more builds"
[& build-ids]
(ra/start-figwheel!
{:build-ids build-ids
2015-12-15 18:08:18 +00:00
:all-builds cljs-builds})
(ra/cljs-repl))
(defn stop-figwheel
"Stops figwheel"
[]
(ra/stop-figwheel!))