1 | (ns user
|
2 | (:use [figwheel-sidecar.repl-api :as ra]))
|
3 |
|
4 |
|
5 |
|
6 | (def profiles (->> "project.clj"
|
7 | slurp
|
8 | read-string
|
9 | (drop-while #(not= % :profiles))
|
10 | (apply hash-map)
|
11 | :profiles))
|
12 |
|
13 | (def cljs-builds (get-in profiles [:dev :cljsbuild :builds]))
|
14 |
|
15 | (defn start-figwheel
|
16 | "Start figwheel for one or more builds"
|
17 | [& build-ids]
|
18 | (ra/start-figwheel!
|
19 | {:build-ids build-ids
|
20 | :all-builds cljs-builds})
|
21 | (ra/cljs-repl))
|
22 |
|
23 | (defn stop-figwheel
|
24 | "Stops figwheel"
|
25 | []
|
26 | (ra/stop-figwheel!)) |
\ | No newline at end of file |