File: yard.rake

package info (click to toggle)
ruby-addressable 2.8.7-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 712 kB
  • sloc: ruby: 9,421; makefile: 11
file content (29 lines) | stat: -rw-r--r-- 685 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# frozen_string_literal: true

require "rake"

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 = FileList[
        "lib/**/*.rb", "ext/**/*.c",
        "README.md", "CHANGELOG.md", "LICENSE.txt"
      ].exclude(/idna/)
    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