File tree Expand file tree Collapse file tree 5 files changed +48
-4
lines changed Expand file tree Collapse file tree 5 files changed +48
-4
lines changed Original file line number Diff line number Diff line change
1
+ .bundle
2
+ vendor /ruby
Original file line number Diff line number Diff line change
1
+ source "http://rubygems.org"
2
+
3
+ gem "fssm" , "0.2.0"
Original file line number Diff line number Diff line change
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ fssm (0.2.0 )
5
+
6
+ PLATFORMS
7
+ ruby
8
+
9
+ DEPENDENCIES
10
+ fssm (= 0.2.0 )
Original file line number Diff line number Diff line change 1
- verbose ( true )
1
+ require "bundler/setup"
2
2
3
- task :default => :test
3
+ task :default => :watch
4
4
5
- desc ' Publish "marketing" docs'
5
+ desc " Publish "marketing " docs"
6
6
task :publish do
7
7
sh ( "git rebase master gh-pages" )
8
8
sh ( "git checkout master" )
@@ -11,7 +11,36 @@ task :publish do
11
11
sh ( "git push --tags" )
12
12
end
13
13
14
- desc 'Open your default browser with the test page'
14
+ desc "Build everything"
15
+ task :build do
16
+ rebuild_coffee
17
+ end
18
+
19
+ desc "Watch for changes and test the site"
20
+ task :watch => :build do
21
+ sh ( "open test/index.html" )
22
+ monitor
23
+ end
24
+
25
+ desc "Open your default browser with the test page"
15
26
task :test do
16
27
sh ( "open test/index.html" )
17
28
end
29
+
30
+ def rebuild_coffee ( base = nil , relative = "**/*.coffee" )
31
+ sh ( "coffee -c #{ relative } " )
32
+ end
33
+
34
+ def monitor
35
+ require "fssm"
36
+ puts ">>> Monitoring for changes. Press Ctrl-C to Stop."
37
+ FSSM . monitor do
38
+ path "." do
39
+ glob "**/*.coffee"
40
+ update &method ( :rebuild_coffee )
41
+ delete &method ( :rebuild_coffee )
42
+ create &method ( :rebuild_coffee )
43
+ end
44
+ end
45
+ end
46
+
You can’t perform that action at this time.
0 commit comments