26 lines
600 B
Ruby
26 lines
600 B
Ruby
require "rake"
|
|
|
|
begin
|
|
require "yard/rake/yardoc_task"
|
|
|
|
namespace :doc do
|
|
desc "Generate Yardoc documentation"
|
|
YARD::Rake::YardocTask.new do |yardoc|
|
|
yardoc.name = "yard"
|
|
yardoc.options = "-o doc/"
|
|
yardoc.files = FileList[
|
|
"lib/**/*.rb", "ext/**/*.c", "-", "README", "CHANGELOG", "LICENSE"
|
|
].exclude(/^[_\.]/)
|
|
end
|
|
end
|
|
|
|
task "clobber" => ["doc:clobber_yard"]
|
|
|
|
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
|