diff --git a/resources/user.clj b/resources/user.clj index 4c2ca8b..af5bd4f 100644 --- a/resources/user.clj +++ b/resources/user.clj @@ -3,24 +3,27 @@ ;; 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])) +(def project-config (->> "project.clj" + slurp + read-string + (drop-while #(not= % (or :figwheel :profiles))) + (apply hash-map))) + +(def cljs-builds (get-in project-config [:profiles :dev :cljsbuild :builds])) +(def figwheel-options (get project-config :figwheel {})) (defn start-figwheel "Start figwheel for one or more builds" [& build-ids] (ra/start-figwheel! {:build-ids build-ids - :all-builds cljs-builds}) + :all-builds cljs-builds + :figwheel-options figwheel-options + }) (ra/cljs-repl)) (defn stop-figwheel "Stops figwheel" [] - (ra/stop-figwheel!)) \ No newline at end of file + (ra/stop-figwheel!))