re-natal/resources/user.clj
Artur Girenko 1b37d60ea0 support development of iOS and Android apps simultaneously #4
- remove setting up host from use-figwheel command
- introduce use-android-device command for changing android host. use-android-device command has to be executed only when user changes android device type for development
- change figwheel support functions in user.clj to support multiple builds
- add instructions to README of how to run iOS and Android simulators simultaneously
2016-01-24 13:46:34 +01:00

26 lines
701 B
Clojure

(ns user
(:use [figwheel-sidecar.repl-api :as ra]))
;; 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
:all-builds cljs-builds})
(ra/cljs-repl))
(defn stop-figwheel
"Stops figwheel"
[]
(ra/stop-figwheel!))