Skip to content

Latest commit

 

History

History
60 lines (36 loc) · 1.68 KB

README.rdoc

File metadata and controls

60 lines (36 loc) · 1.68 KB

Guard::LiveReload

LiveReload guard allows to automatically reload your browser when ‘view’ files are modified.

Install

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

Usage

Please read guard usage doc and LiveReload extension usage doc

Guardfile

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

Options

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.

Development

Pull requests are very welcome! Make sure your patches are well tested. Please create a topic branch for every separate change you make.

Authors

Thibaud Guillaume-Gentil