Permalink
Browse files

tweaks

  • Loading branch information...
1 parent 3dc8bf6 commit e61dd26ac76e7f1d148b3b89c26f12f9ab1d9e3e @defunkt defunkt committed Mar 6, 2010
Showing with 34 additions and 16 deletions.
  1. +14 −5 README.md
  2. +20 −11 Rakefile
View
@@ -1,8 +1,17 @@
-I am <http://defunkt.github.com/mustache/>.
+I am <http://defunkt.github.com/mustache/>
Commands:
- rake build # Build the index.html
- rake open # Build & open index.html in your browser with `open(1)`
- rake print # Print the index.html
- rake publish # Publish gh-pages to GitHub
+ rake build # Build the whole site
+ rake build:coffee # Build JavaScript
+ rake build:data # Build data.yml
+ rake build:html # Build index.html
+ rake open # Build & open index.html in your browser with `open(1)`
+ rake print # Build and print the index.html
+ rake publish # Publish gh-pages to GitHub
+
+Use with [kicker][kc]:
+
+ kicker -e "rake build:coffee build:html"
+
+[kc]: http://github.com/alloy/kicker
View
@@ -1,25 +1,34 @@
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 && open index.html"
+ exec "rake build:html && open index.html"
+end
+
+desc "Build JavaScript"
+task "build:coffee" do
+ sh "coffee --no-wrap *.coffee"
end
-desc "Build the index.html"
-task :build do
- exec "coffee --no-wrap tom.coffee &&
- ruby -rubygems data.rb > data.yml &&
- cat data.yml index.mustache | mustache > index.html"
+desc "Build data.yml"
+task "build:data" do
+ ruby "-rubygems data.rb > data.yml"
end
-desc "Print the index.html"
-task :print do
- exec "ruby -rubygems data.rb > data.yml &&
- cat data.yml index.mustache | mustache"
+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"

0 comments on commit e61dd26

Please sign in to comment.