middleman / middleman-livereload

LiveReload support for Middleman
http://middlemanapp.com
MIT License
118 stars 39 forks source link

Livereload Reloading All the Paths #92

Open nolanseaton opened 8 years ago

nolanseaton commented 8 years ago

Recently migrated a project from middleman 3 to 4. Livereload is working, however, it is reloading all of my haml files and not just the changed file.

I change careers.html.haml and in terminal I see it reloading paths from work/*, explore, contact etc...

Before the migration I would just see the careers page being reloaded in terminal.

config.rb

activate :livereload

Is there a config option I'm missing or is this the correct functionality?

Thanks!

inem commented 8 years ago

I have the same effect, and it is really annoying. Especially if you edit and update a file frequently, and your website is big.

inem commented 8 years ago

Proof: reload

You can reproduce it easily, using this project: https://gitlab.com/gitlab-com/www-gitlab-com

tdreyno commented 8 years ago

Unfortunately, we don't have a means of knowing which files of a same-type influence which other files. Our template renderer (Padrino) does not provide a dependency graph. The simplest (and slowest) solution is to reload all files of a type if one changes.

tdreyno commented 8 years ago

As an aside, there is no full-time maintainer for this extension. I just try keep it from being broken, but never use Livereload when using Middleman for work.

If anyone has time, desire and attention, I'd happily allow them to work on improving Livereload support.

sandstrom commented 7 years ago

@tdreyno Is there a way to turn off the reload everything behaviour?

Also, somewhat related, where are the files that the reload extension operate on defined? https://github.com/middleman/middleman-livereload/blob/master/lib/middleman-livereload/extension_3_1.rb#L52

also, I've found a small bug in the ignore option, with a fix here: https://github.com/middleman/middleman-livereload/pull/95