Skip to content

Instantly share code, notes, and snippets.

@mipearson
Created January 1, 2012 12:07
Show Gist options
  • Save mipearson/1547160 to your computer and use it in GitHub Desktop.
Save mipearson/1547160 to your computer and use it in GitHub Desktop.
Getting Livereload 1.x working with compass and Rails 3.0 with no asset pipeline
project_type = :rails
http_path = '/'
# TODO: Hacky way to get livereload working with compass
css_dir = 'public/stylesheets/REDACTED'
sass_dir = 'public/stylesheets/REDACTED/sass'
group :development do
gem 'guard-livereload', :require => false
gem 'guard-compass', :require => false
gem 'yajl-ruby', :require => false
end
# Useful links:
# https://github.com/guard/guard-livereload
# https://github.com/guard/guard#readme
# https://github.com/mockko/livereload#readme
guard 'compass' do
watch(%r{^public/stylesheets/REDACTED/sass/.+scss})
end
guard 'livereload' do
watch(%r{(public/).+\.(css|js|html)})
watch(%r{(public/stylesheets/REDACTED/sass/.+scss)}) { 'public/stylesheets/REDACTED/screen.css'
# Original:
# watch(%r{app/.+\.(erb|haml)})
# watch(%r{app/helpers/.+\.rb})
# watch(%r{(public/|app/assets).+\.(css|js|html)})
# watch(%r{(app/assets/.+\.css)\.s[ac]ss}) { |m| m[1] }
# watch(%r{(app/assets/.+\.js)\.coffee}) { |m| m[1] }
# watch(%r{config/locales/.+\.yml})
end
guard: bundle exec guard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment