hiddentao / gulp-server-livereload

Gulp plugin to run a local webserver with livereload enabled via socket.io. Also comes with standalone command-line interface.
MIT License
93 stars 28 forks source link

Refresh / inject CSS files instead of reloading all #14

Closed Elindorath closed 9 years ago

Elindorath commented 9 years ago

Could it be possible to not reload the entire page when only css changed? This is very annoying when you want to work your design precisely.

Thanks for the good work !

hiddentao commented 9 years ago

Yeah I've thought about this and it could probably be made to happen given a bit of work in the server. Perhaps the server can tell the browser which files have changed and then the browser code can decide whether to reload the whole page or not. For this to really work though, we'd need to make that code running in the browser customizable. It's a bit of work to do, and I may get round to it in future. PR always welcome.

RomainGoncalves commented 9 years ago

+1

hiddentao commented 9 years ago

I've just added support for CSS injection, see the latest README.

hiddentao commented 9 years ago

You shouldn't need to change your configuration settings or anything, it should just work. Also the way the script figures out the livereload server host/port etc. is now much smarter.