forked from rubyworks/facets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreap.docs
55 lines (43 loc) · 1.85 KB
/
reap.docs
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/env ruby
require 'fileutils'
metadata = YAML.load_file('.ruby')
version = metadata['version']
desc "Generate documentation"
task :document do
FileUtils.mkdir("web/docs/facets-#{version}")
system "shomen yard --yardopts .yard/core.yardopts > web/docs/facets-#{version}/core.json"
system "shomen yard --yardopts .yard/more.yardopts > web/docs/facets-#{version}/more.json"
system "shomen yard --yardopts .yard/standard.yardopts > web/docs/facets-#{version}/standard.json"
system "shomen yard --yardopts .yard/supplement.yardopts > web/docs/facets-#{version}/supplement.json"
end
# yard core extensions
file "lib/core/**/*.rb" do
#cmd = "yard "
#cmd << "-o site/doc/yard/core "
##cmd << "--title 'Facets Core Extensions' "
#cmd << "-r doc/README.core "
#cmd << "lib/core - README.rdoc AUTHORS.rdoc NOTICE.rdoc "
#abort unless system cmd
abort unless system "shomen yard --yardopts .yard/core.yardopts > web/docs/facets-#{version}/core.json"
end
# yard standard extensions
file "lib/standard/**/*.rb" do
#cmd = "yard "
#cmd << "-o site/doc/yard/standard "
##cmd << "--title 'Facets Standard Extensions' "
#cmd << "-r doc/README.standard "
#cmd << "lib/standard - README.rdoc AUTHORS.rdoc NOTICE.rdoc "
#abort unless system cmd
abort unless system "shomen yard --yardopts .yard/standard.yardopts > web/docs/facets-#{version}/standard.json"
end
#
# GENERATE RDOCS
# ----------------------------------------------------------------------------
desc "generate rdocs"
task "rdoc" do
TEMPLATE = ENV['RDOC_TEMPLATE'] || 'html'
APIOUT = "web/docs/rdoc"
FileUtils.rm_r(APIOUT)
system "rdoc -a -S -t'Facets Core API' -T #{TEMPLATE} -m README.rdoc --op '#{APIOUT}/core' README.rdoc lib/facets/core"
system "rdoc -a -S -t'Facets Standard API' -T #{TEMPLATE} -m README.rdoc --op '#{APIOUT}/standard' README.rdoc lib/facets/standard"
end