Fork me on GitHub
#lein-figwheel
<
2016-12-12
>
misha16:12:40

@shaun-mahood I kept it almost identical to the default project.clj generated by re-natal

misha16:12:20

I think I need to replace :figwheel true with :fogwheel {...}

shaun-mahood16:12:29

@misha: Try adding :figwheel {:nrepl-port 7888} just above :profiles and see if that works - that's how I have mine configured, and looking at https://github.com/bhauman/lein-figwheel/wiki/Configuration-Options I think it should work (if it doesn't at least we'll find out quickly).

misha16:12:49

that'd be "server-side" place to add it

misha16:12:09

Configurations happens in your project.clj file and is separated into
 serverside configs (:figwheel {...} on your "root" level)
 and per-build, or client side, configs (:cljsbuild {:builds [{:figwheel {...}}]}).

shaun-mahood16:12:33

Yep. If I understand correctly it would then apply to any per-build configs.

misha16:12:12

but Bruce mentioned something about "FW configs merge will not happen if FW is launched from (n?)REPL, something something"

shaun-mahood16:12:33

Not sure about that - the global config works for me. You don't really have much of a per-client config anyway, so it may not matter either way.

misha16:12:15

got a startup idea: project.clj explainer. splits p.clj into tools' cfg maps

misha17:12:27

Starting clojure.main REPL...
[...] clojure.main script/repl.clj -r
Figwheel: Starting server at 
Choose focus build for CLJS REPL () or quit > ios
Error: ios is not a valid choice
Choose focus build for CLJS REPL () or quit > "ios"
Error: "ios" is not a valid choice
Choose focus build for CLJS REPL () or quit > ":ios"
Error: ":ios" is not a valid choice
Choose focus build for CLJS REPL () or quit > :ios
Error: :ios is not a valid choice
Choose focus build for CLJS REPL () or quit > (start-autobuild "ios")
Error: (start-autobuild "ios") is not a valid choice
Choose focus build for CLJS REPL () or quit > 1
Error: 1 is not a valid choice
send help dafuq

misha18:12:16

ok, start-figwheel! did not see [:cljsbuild :builds] inside :profiles. "fixed" with

(let [dev-builds (->> "./project.clj" slurp read-string vec (#(subvec % 3)) (apply hash-map) :profiles :dev :cljsbuild :builds)
      ids (mapv :id dev-builds)
      cfg {:figwheel-options {}
           :build-ids  ids
           :all-builds dev-builds}]
  (start-figwheel! cfg)
  (cljs-repl "ios"))