LiveReload guard allows to automatically reload your browser when ‘view’ files are modified.
Please be sure to have guard installed before continue.
Install the gem:
gem install guard-livereload
Add it to your Gemfile (inside test group):
gem 'guard-livereload'
Add guard definition to your Guardfile by running this command:
guard init livereload
Install LiveReload Safari/Chrome extension
Please read guard usage doc and LiveReload extension usage doc
You can adapt your ‘view’ files like you want. Please read guard doc for more info about Guardfile DSL.
guard 'livereload' do watch('app/.+\.(erb|haml)$') watch('app/helpers/.+\.rb$') watch('public/.+\.(css|js|html)$') watch('config/locales/.+\.yml$') end
LiveReload guard have five options (host, port, api_version, apply_js_live and apply_css_live):
guard 'livereload', :port => '35728' do ... end
See LiveReload configuration doc for more info about those options.
-
Source hosted at GitHub
-
Report issues/Questions/Feature requests on GitHub Issues
Pull requests are very welcome! Make sure your patches are well tested. Please create a topic branch for every separate change you make.