lein-figwheel icon indicating copy to clipboard operation
lein-figwheel copied to clipboard

What about reload when html files changes ?

Open edipofederle opened this issue 10 years ago • 11 comments

This is possible on current state of lein-figwheel ?

edipofederle avatar Oct 20 '14 20:10 edipofederle

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.

bhauman avatar Oct 25 '14 15:10 bhauman

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. :)

donbonifacio avatar Nov 22 '14 12:11 donbonifacio

@bhauman cool.

edipofederle avatar Nov 22 '14 12:11 edipofederle

Also +1 for this.

fterrier avatar Jan 04 '15 14:01 fterrier

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 avatar Jan 19 '15 01:01 bhauman

@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?

expez avatar Jan 19 '15 07:01 expez

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.

tobgu avatar Feb 15 '15 19:02 tobgu

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.

bhauman avatar Feb 15 '15 19:02 bhauman

Ok, thanks for your prompt reply!

tobgu avatar Feb 15 '15 21:02 tobgu

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.

martinskou avatar Apr 30 '15 13:04 martinskou

refresh-paths option would be amazing!

greywolve avatar Oct 11 '15 14:10 greywolve