lein-figwheel
lein-figwheel copied to clipboard
What about reload when html files changes ?
This is possible on current state of lein-figwheel ?
It's possible, and sounds cool, but it feels out of scope right now. I'm waiting to see if some way to compose these different needs rises to the surface in the Clojure eco system.
I added css reloading as a bonus and wasn't intending to go down the whole live-reload route.
I'd love to see a separate live-reload library that figwheel could hook into.
Would also love this. Code/html/sass auto reloading will be a killer feature here for our designers to go on board with the devs on cljs. :)
@bhauman cool.
Also +1 for this.
I'm revisiting this. How about a config option called refresh-paths: that will take a list of files or directories to watch.
And then when a change occurs reload the whole application page.
@bhauman that sounds great! Do you use enlive at all? If so, would you also consider bundling these lines of code?
It would be nice to have a one-stop-shop for keeping stuff on disk and in the browser in sync. Is this the path you're going down now?
I was not able to get the ring.middleware.reload/wrap-reload middleware to work with figwheel (maybe it's possible? I'm very new to this and didn't manage). Would be awesome if the server side code could also be reloaded on change by figwheel. I know that I could serve that from another server but that would add another moving part.
Yes you'll really want to have your own server to have that work.
You can out your simple ring handler code in the :source-paths of your cljsbuild, alongside your cljs code and then it will reload automatically. But this is a trick that only works while your sever code is simple.
Better off having a separate server.
On Feb 15, 2015, at 2:12 PM, Tobias Gustafsson [email protected] wrote:
I was not able to get the ring.middleware.reload/wrap-reload middleware to work with figwheel (maybe it's possible? I'm very new to this and didn't manage). Would be awesome if the server side code could also be reloaded on change by figwheel. I know that I could serve that from another server but that would add another moving part.
— Reply to this email directly or view it on GitHub.
Ok, thanks for your prompt reply!
ring.middleware.reload/wrap-reload seems to work fine on the server with the standard reagent-template, but it does not force a reload of the browser page.
refresh-paths option would be amazing!