Skip to content

Instantly share code, notes, and snippets.

@biscuitvile
Forked from okonet/Guardfile
Created July 27, 2012 01:34
Show Gist options
  • Save biscuitvile/3185669 to your computer and use it in GitHub Desktop.
Save biscuitvile/3185669 to your computer and use it in GitHub Desktop.
Example of a Guardfile
guard 'coffeescript', :input => 'app', :output => 'public/javascripts/app', :cli => ''
guard 'coffeescript', :input => 'spec/coffeescripts', :output => 'spec/javascripts'
guard 'compass' do
watch(/app\/stylesheets\/(.*)\.s[ac]ss/)
end
spec_location = "spec/coffeescripts/%s_spec"
guard 'jasmine-headless-webkit' do
watch(%r{^spec/coffeescripts/(.*)_spec\..*}) { |m| newest_js_file(spec_location % m[1]) }
watch(%r{^app/(.*)\..*}) { |m| newest_js_file(spec_location % m[1]) }
end
guard 'jammit' do
watch(%r{^public/.+\.js})
watch(%r{^public/.+\.css})
end
guard 'livereload', :apply_js_live => false do
watch(%r{^public/.+\.js})
watch(%r{^public/.+\.css})
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment