-
-
Notifications
You must be signed in to change notification settings - Fork 937
Expand file tree
/
Copy pathrdoc.rake
More file actions
30 lines (25 loc) · 984 Bytes
/
rdoc.rake
File metadata and controls
30 lines (25 loc) · 984 Bytes
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
30
# frozen_string_literal: true
begin
require "rdoc/task"
def rdoc_nokogiri_common_options(rdoc)
rdoc.rdoc_files
.include("*.md", "lib/**/*.rb", "ext/**/*.c", "doc/**/*md")
.exclude("CHANGELOG.md", "ROADMAP.md", "ext/nokogiri/test_global_handlers.c")
rdoc.options << "--embed-mixins"
rdoc.options << "--main=README.md"
end
RDoc::Task.new(rdoc: "rdoc", clobber_rdoc: "rdoc:clean", rerdoc: "rdoc:force") do |rdoc|
rdoc.rdoc_dir = ENV["RDOC_DIR"] || "html"
rdoc.options << "--show-hash"
rdoc.options << "--template-stylesheets=misc/rdoc-tweaks.css"
rdoc_nokogiri_common_options(rdoc)
end
RDoc::Task.new(rdoc: "ri", clobber_rdoc: "ri:clean", rerdoc: "ri:force") do |rdoc|
rdoc.rdoc_dir = ENV["RI_DIR"] || "ri"
rdoc.generator = "ri"
rdoc_nokogiri_common_options(rdoc)
end
task clean: "rdoc:clean" # rubocop:disable Rake/Desc
rescue LoadError => e
warn("WARNING: rdoc is not available in this environment: #{e}")
end