Rakefile in vanity-1.4.0.beta vs Rakefile in vanity-1.4.0
- old
+ new
@@ -109,17 +109,24 @@
rescue LoadError
end
desc "Jekyll generates the main documentation (sans API)"
task(:jekyll) { sh "jekyll", "doc", "html" }
+file "html/vanity.pdf"=>:jekyll do |t|
+ pages = %w{index metrics ab_testing rails identity configuring contributing}.map{ |p| "html/#{p}.html" }
+ args = %w{--disable-javascript --outline --title Vanity --header-html doc/_layouts/_header.html --print-media-type}
+ args.concat %w{--margin-left 20 --margin-right 20 --margin-top 20 --margin-bottom 20 --header-spacing 5}
+ args.concat pages << t.name
+ sh "wkhtmltopdf", *args
+end
-file "html/vanity-api-#{spec.version}.zip"=>:yardoc do |t|
+file "html/vanity-api.zip"=>:yardoc do |t|
Dir.chdir "html" do
- sh "zip vanity-api-#{spec.version}.zip -r api"
+ sh "zip vanity-api.zip -r api"
end
end
desc "Create documentation in docs directory (including API)"
-task :docs=>[:jekyll, :yardoc, "html/vanity-api-#{spec.version}.zip"]
+task :docs=>[:jekyll, :yardoc, "html/vanity-api.zip", "html/vanity.pdf"]
desc "Remove temporary files and directories"
task(:clobber) { rm_rf "html" ; rm_rf ".yardoc" }
desc "Publish documentation to vanity.labnotes.org"
task :publish=>[:clobber, :docs] do