Add a rake task for re-using the existing .yardoc cache.

This commit is contained in:
Nathan Weizenbaum 2009-06-18 14:45:39 -07:00
parent dc8433432c
commit 6629968351
1 changed files with 2 additions and 0 deletions

View File

@ -136,6 +136,7 @@ begin
list.exclude('lib/haml/template/*.rb')
list.exclude('lib/haml/helpers/action_view_mods.rb')
end.to_a
t.options << '--use-cache' if Rake.application.top_level_tasks.include?('redoc')
t.options += FileList.new('yard/*.rb').to_a.map {|f| ['-e', f]}.flatten
files = FileList.new('doc-src/*').to_a.sort_by {|s| s.size} + %w[MIT-LICENSE VERSION]
t.options << '--files' << files.join(',')
@ -144,6 +145,7 @@ begin
desc "Generate Documentation"
task :doc => :yardoc
task :redoc => :yardoc
rescue LoadError
desc "Generate Documentation"
task :doc => :rdoc