Skip to content

Instantly share code, notes, and snippets.

@matthewlehner
Created September 15, 2012 01:49
Show Gist options
  • Save matthewlehner/3726019 to your computer and use it in GitHub Desktop.
Save matthewlehner/3726019 to your computer and use it in GitHub Desktop.
Rails 3 guard-livereload guard
# This assumes you use sass requires for css, not sprockets.
guard 'livereload' do
watch(%r{app/.+\.(erb|haml)})
watch(%r{app/helpers/.+\.rb})
watch(%r{app/assets/stylesheets/(.+\.css).*$}) { |m| "assets/#{m[1]}" }
watch(%r{app/assets/javascripts/(.+\.js).*$}) { |m| "assets/#{m[1]}" }
watch(%r{(app|vendor)/assets/.+\.(sass|scss)}) { '/assets/all/application.css' }
watch(%r{public/.+\.(css|js|html)})
watch(%r{config/locales/.+\.yml})
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment