Skip to content

Instantly share code, notes, and snippets.

@j-mcnally
Last active December 18, 2015 16:19
Show Gist options
  • Select an option

  • Save j-mcnally/5810163 to your computer and use it in GitHub Desktop.

Select an option

Save j-mcnally/5810163 to your computer and use it in GitHub Desktop.
Live reload
config.middleware.insert_after(ActionDispatch::Static, Rack::LiveReload)
group :development do
gem 'rack-livereload'
gem 'guard-livereload'
gem 'guard'
end
guard 'livereload' do
watch(%r{app/views/.+\.(erb|haml|slim)})
watch(%r{app/controllers/.+\.(rb)})
watch(%r{app/models/.+\.(rb)})
watch(%r{app/helpers/.+\.rb})
watch(%r{public/.+\.(css|js|html)})
watch(%r{config/locales/.+\.yml})
# Rails Assets Pipeline
watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|js|html))).*}) { |m| "/assets/#{m[3]}" }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment