lib/guard/livereload.rb in guard-livereload-0.1.10 vs lib/guard/livereload.rb in guard-livereload-0.1.11
- old
+ new
@@ -17,11 +17,12 @@
@options = {
:api_version => '1.6',
:host => '0.0.0.0',
:port => '35729',
:apply_js_live => true,
- :apply_css_live => true
+ :apply_css_live => true,
+ :grace_period => 0
}.update(options)
end
def start
@reactor = Reactor.new(@options)
@@ -30,9 +31,10 @@
def stop
reactor.stop
end
def run_on_change(paths)
+ sleep @options[:grace_period]
reactor.reload_browser(paths)
end
end
end