Closed kevincox closed 9 years ago
Is this sufficient? https://github.com/Arcovion/middleman-livereload/commit/9c72eb8297127a5a58c1bb143fb655a6238e26df
Try with:
gem 'middleman-livereload', github: 'arcovion/middleman-livereload', branch: 'ignore-option'
I've only done this change through GitHub, no actual testing...
You are so fast I barely had time to implement my quick, ugly workaround but I'll post it here in case it is useful.
activate :livereload
ready do
self.class.instance_variable_get(:@middleware)[-1][1][0][:ignore] = [
%r(^/assets/),
# Other ignore paths.
]
end
Ensure that you add the block right after activating livereload.
Thanks! Works perfectly.
Currently there is no way to select which files get the livereload script tag injected in them. This causes problems when you are transmitting html fragments (such as for html imports) and rack tries to insert it's script tag and ends up turning it into a document. If Rack::LiveReload's ignore option was exposed it would be easy to prevent these files from being modified.