-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGuardfile
More file actions
44 lines (38 loc) · 1.52 KB
/
Guardfile
File metadata and controls
44 lines (38 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
if RUBY_PLATFORM.downcase.include?("darwin")
notification :growl
else
notification :off
end
guard 'spork', :cucumber_env => { 'RAILS_ENV' => 'test' }, :rspec_env => { 'RAILS_ENV' => 'test' } do
watch('config/application.rb')
watch('config/environment.rb')
watch(%r{^config/environments/.+\.rb$})
watch(%r{^config/initializers/.+\.rb$})
watch('Gemfile')
watch('Gemfile.lock')
watch('spec/spec_helper.rb') { :rspec }
watch('test/test_helper.rb') { :test_unit }
watch(%r{features/support/}) { :cucumber }
end
guard 'livereload' do
watch(%r{app/.+\.(erb|haml|slim|rabl)})
watch(%r{app/helpers/.+\.rb})
watch(%r{(public/|app/assets).+\.(css|js|html)})
watch(%r{app/assets/.+\.hbs})
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 'coffeescript', :output => 'tmp/javascripts/compiled/app' do
watch(/^app\/assets\/javascripts\/.+\.coffee/)
end
guard 'coffeescript', :output => 'tmp/javascripts/compiled/spec' do
watch(/^spec\/javascripts\/(.*).coffee/)
end
guard 'jasmine', :server => :none, :jasmine_url => 'http://localhost:3000/jasmine' do
watch(%r{spec/javascripts/spec\.(js\.coffee|js|coffee)$}) { "spec/javascripts" }
watch(%r{tmp/javascripts/compiled/spec/.+_spec\.(js\.coffee|js|coffee)$})
watch(%r{app/assets/javascripts/(.+?)\.(js\.coffee|js|coffee)$}) { |m| "tmp/javascripts/compiled/spec/#{m[1]}_spec.#{m[2]}" }
end