middleman-livereload icon indicating copy to clipboard operation
middleman-livereload copied to clipboard

Livereload Reloading All the Paths

Open nolanseaton opened this issue 9 years ago • 5 comments

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!

nolanseaton avatar Jul 07 '16 19:07 nolanseaton

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 avatar Aug 22 '16 04:08 inem

Proof: reload

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

inem avatar Aug 22 '16 04:08 inem

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 avatar Sep 05 '16 12:09 tdreyno

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.

tdreyno avatar Sep 05 '16 12:09 tdreyno

@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

sandstrom avatar Nov 22 '16 18:11 sandstrom