2012-02-04 19:08:16 +00:00
|
|
|
# A sample Guardfile
|
|
|
|
# More info at https://github.com/guard/guard#readme
|
|
|
|
|
2012-08-28 20:59:27 +00:00
|
|
|
# Run JS and CoffeeScript files in a typical Rails 3.1 fashion, placing Underscore templates in app/views/*.jst
|
|
|
|
# Your spec files end with _spec.{js,coffee}.
|
|
|
|
|
|
|
|
spec_location = "spec/javascripts/%s_spec"
|
|
|
|
|
|
|
|
# uncomment if you use NerdCapsSpec.js
|
|
|
|
# spec_location = "spec/javascripts/%sSpec"
|
|
|
|
|
|
|
|
guard 'jasmine-headless-webkit', :notify => false do
|
|
|
|
watch(%r{^app/views/.*\.jst$})
|
|
|
|
watch(%r{^public/javascripts/(.*)\.js$}) { |m| newest_js_file(spec_location % m[1]) }
|
2012-09-13 11:22:30 +00:00
|
|
|
watch(%r{^app/assets/javascripts/(.*)\.js\.coffee$}) { |m| newest_js_file(spec_location % m[1]) }
|
2012-08-28 20:59:27 +00:00
|
|
|
watch(%r{^app/assets/javascripts/(.*)\.(js|coffee)$}) { |m| newest_js_file(spec_location % m[1]) }
|
|
|
|
watch(%r{^spec/javascripts/(.*)_spec\..*}) { |m| newest_js_file(spec_location % m[1]) }
|
2012-02-04 19:08:16 +00:00
|
|
|
end
|