forked from mustache/mustache.github.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
37 lines (30 loc) · 751 Bytes
/
Rakefile
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
task :default => :test
task :test do
# nothing
end
desc "Build & open index.html in your browser with `open(1)`"
task :open do
exec "rake build:html && open index.html"
end
desc "Build JavaScript"
task "build:coffee" do
sh "coffee --no-wrap *.coffee"
end
desc "Build data.yml"
task "build:data" do
ruby "-rubygems data.rb > data.yml"
end
desc "Build index.html"
task "build:html" do
sh "cat data.yml index.mustache | mustache > index.html"
end
desc "Build the whole site"
task :build => [ "build:coffee", "build:data", "build:html" ]
desc "Build and print the index.html"
task :print => "build:html" do
exec "cat index.html"
end
desc "Publish gh-pages to GitHub"
task :publish do
exec "rake build && git push origin gh-pages"
end