-
Notifications
You must be signed in to change notification settings - Fork 191
/
Guardfile
58 lines (48 loc) · 1.73 KB
/
Guardfile
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Notes from the base Guardfile
################################################################################
# Uncomment and set this to only include directories you want to watch
directories %w(dynamic data) \
.select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}
## Note: if you are using the `directories` clause above and you are not
## watching the project directory ('.'), then you will want to move
## the Guardfile to a watched dir and symlink it back, e.g.
#
# $ mkdir config
# $ mv Guardfile config/
# $ ln -s config/Guardfile .
#
# and, you'll have to watch "config/Guardfile" instead of "Guardfile"
################################################################################
#NOTE: So it's been recorded, it looks like there might be an issue with guard
# and OS X;
# "If you are on Mac OS X and have problems with either Guard not reacting to
# file changes or Pry behaving strangely, then you probably suffer under a Ruby
# build that uses libedit instead of readline."
# As noted on
# https://github.com/guard/guard/wiki/Add-Readline-support-to-Ruby-on-Mac-OS-X
group :js do
guard 'rake', :task => 'build:js' do
watch(%r{^dynamic/js/.*\.js$})
watch(%r{^dynamic/js/.*\.coffee$})
end
end
group :css do
guard 'rake', :task => 'build:css' do
watch(%r{^dynamic/css/.*\.css$})
watch(%r{^dynamic/css/.*\.scss$})
watch(%r{^dynamic/css/.*\.sass$})
end
end
group :debug_js do
guard 'rake', :task => 'build:debug:js' do
watch(%r{^dynamic/js/.*\.js$})
watch(%r{^dynamic/js/.*\.coffee$})
end
end
group :debug_css do
guard 'rake', :task => 'build:debug:css' do
watch(%r{^dynamic/css/.*\.css$})
watch(%r{^dynamic/css/.*\.scss$})
watch(%r{^dynamic/css/.*\.sass$})
end
end