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

Need to execute a command before figwheel starts ? #671

Closed metacritical closed 6 years ago

metacritical commented 6 years ago

I need to execute a command say # electron . in a separate subprocess before figwheel starts is there a possibility one could use :eval-fn key to execute say a clojure.java.shell? or maybe other clever way in figwheel?

danielcompton commented 6 years ago

If you want a particularly custom lifecycle you can use Component to coordinate things in just the right way for your project. I don't quite understand the context, but could you also just run something like this?

$ ./run-my-command.sh && lein figwheel
metacritical commented 6 years ago

Thanks., can you give an example how to use :eval-fn key?

danielcompton commented 6 years ago

I don't think :eval-fn is what you want, that seems more for customising the eval command that the browser client is going to run, not for running arbitrary functions. I think this is more of a usage question than a feature request that might get more responses in the #lein-figwheel channel on Clojurians Slack?