google-api-ruby-client/rakelib/yard.rake

30 lines
673 B
Ruby
Raw Normal View History

require 'rake'
require 'rake/clean'
CLOBBER.include('doc', '.yardoc')
CLOBBER.uniq!
begin
require 'yard'
require 'yard/rake/yardoc_task'
namespace :doc do
desc 'Generate Yardoc documentation'
YARD::Rake::YardocTask.new do |yardoc|
yardoc.name = 'yard'
yardoc.options = ['--verbose', '--markup', 'markdown']
yardoc.files = [
'lib/**/*.rb', 'ext/**/*.c', '-',
2013-03-17 23:33:44 +00:00
'README.md', 'CONTRIB.md', 'CHANGELOG.md', 'LICENSE'
]
end
end
desc 'Alias to doc:yard'
task 'doc' => 'doc:yard'
rescue LoadError
# If yard isn't available, it's not the end of the world
desc 'Alias to doc:rdoc'
task 'doc' => 'doc:rdoc'
end