bhauman / figwheel-main

Figwheel Main provides tooling for developing ClojureScript applications
https://figwheel.org
Eclipse Public License 1.0
640 stars 93 forks source link

Disable ring / jetty with a command line option #283

Open sirmspencer opened 3 years ago

sirmspencer commented 3 years ago

I have a large project that mostly loads with figwheel and the jetty server it loads. We have one specific server side function that requires me to load the server separately for testing. It would be nice to be able to disable jetty from the command line without modifying our figwheel-main.edn file.

Something like: clojure -m figwheel.main -b compile-dev -j or clojure -A:figwheel -j where -j disables jetty

We are using figwheel like

:figwheel         {:extra-deps {com.bhauman/figwheel-main {:mvn/version "0.2.4-SNAPSHOT"}
                                           com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"}}
                              :main-opts ["-m" "figwheel.main" "-b" "compile-dev" "-r"]}

My edn file looks like

{:watch-dirs ["src/cljs"]
 :css-dirs ["resources/public/css"]
 :ring-server-options {:port 8080 :join? false}
 :ring-handler my-proj.handler/development-app}