From 0ae5580c348e3258149a9996733526143493a0b2 Mon Sep 17 00:00:00 2001 From: Brian John Date: Sat, 16 Jun 2012 16:09:19 -0500 Subject: [PATCH 1/3] git ignore Sass Cache files under site/ --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 57ec2d0..c3c3c8b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /site/jquery.transit.js /site/jquery.transit.min.js /site/docco.css +/site/.sass-cache From 98ac37745ebcaa5a3d3ee72d9ae71302abeed23d Mon Sep 17 00:00:00 2001 From: Brian John Date: Sat, 16 Jun 2012 16:10:58 -0500 Subject: [PATCH 2/3] have to explicitely rescue from 'require' with a LoadError, otherwise ruby will terminate with an error. See http://stackoverflow.com/questions/2460891/how-do-i-rescue-from-a-require-no-such-file-to-load-in-ruby --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 4558805..75906a2 100644 --- a/Rakefile +++ b/Rakefile @@ -61,7 +61,7 @@ task :check_deps do die "Error: You need Docco. Try `gem install docco`." unless can_run?('docco') begin require 'proton' - rescue => e + rescue LoadError => e die "Error: You need Proton. Try `gem install proton`." end end From c40f81710dee36b6f9b8119f06baf946c31117ca Mon Sep 17 00:00:00 2001 From: Brian John Date: Sat, 16 Jun 2012 16:11:19 -0500 Subject: [PATCH 3/3] use easier-to-install rocco instead of docco, which is actually an npm module --- Rakefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index 75906a2..5b35556 100644 --- a/Rakefile +++ b/Rakefile @@ -58,7 +58,7 @@ task :release => :compress do end task :check_deps do - die "Error: You need Docco. Try `gem install docco`." unless can_run?('docco') + die "Error: You need Rocco. Try `gem install rocco`." unless can_run?('rocco') begin require 'proton' rescue LoadError => e @@ -78,7 +78,7 @@ end # Prepare task :prebuild => [:check_deps, :compress] do puts "==> Generating annotated source..." - system "docco jquery.transit.js > /dev/null" + system "rocco jquery.transit.js > /dev/null" system "mv docs/docco.css site/docco.css" system "mv docs/jquery.transit.html site/source.html" system "rm -rf docs"