bhauman / lein-figwheel

Figwheel builds your ClojureScript code and hot loads it into the browser as you are coding!
Eclipse Public License 1.0
2.88k stars 210 forks source link

How to use both lein-figwheel and figwheel-sidecar in the same project? #637

Closed ghost closed 6 years ago

ghost commented 6 years ago

I just read the tutorial on how to run figwheel in a Cursive Clojure REPL ^1. It specifically reminds the reader to remove the lein-figwheel plugin when adding the figwheel-sidecar dependency.

Now I have some co-workers who do not use Cursive, yet, while I do. Thus I would like not to change anything for them when using Leiningen from the command line, and find a way to still support the sidecar mode for Cursive. How do I do that?

I had the idea to use Leiningen profiles ^2 to only load figwheel-sidecar in a special :cursive profile (which does not include the :dev profile) and in the :dev profile load the lein-figwheel plugin for my co-workers, so nothing would change for them in the regular :dev profile. Is that the correct approach? As a next step I believe I need to communicate which profile to use to figwheel-sidecar.repl-api/start-figwheel!. How would that look like?

bhauman commented 6 years ago

You probably can leave the figwheel plugin in place.

If that causes problems, using a lein profile is a good solution.

On Jan 3, 2018, at 5:19 AM, Dennis Schridde notifications@github.com wrote:

I just read the tutorial on how to run figwheel in a Cursive Clojure REPL ^1. It specifically reminds the reader to remove the lein-figwheel plugin when adding the figwheel-sidecar dependency.

Now I have some co-workers who do not use Cursive, yet, while I do. Thus I would like not to change anything for them when using Leiningen from the command line, and find a way to still support the sidecar mode for Cursive. How do I do that?

I had the idea to use Leiningen profiles ^2 to only load figwheel-sidecar in a special :cursive profile (which does not include the :dev profile) and in the :dev profile load the lein-figwheel plugin for my co-workers, so nothing would change for them in the regular :dev profile. Is that the correct approach? As a next step I believe I need to communicate which profile to use to figwheel-sidecar.repl-api/start-figwheel!. How would that look like?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

bhauman commented 6 years ago

I'm going to close this as answered.