Skip to content

Commit

Permalink
Allow rake to work without YARD.
Browse files Browse the repository at this point in the history
  • Loading branch information
judofyr committed Jul 7, 2015
1 parent 5bb754a commit faba03c
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,22 @@ end

# DOCUMENTATION =============================================================

require 'yard'
YARD::Rake::YardocTask.new do |t|
t.files = [
'lib/tilt.rb', 'lib/tilt/mapping.rb', 'lib/tilt/template.rb',
'-',
'*.md', 'docs/*.md',
]

t.options <<
'--no-private' <<
'--protected' <<
'-m' << 'markdown' <<
'--asset' << 'docs/common.css:css/common.css'
begin
require 'yard'
YARD::Rake::YardocTask.new do |t|
t.files = [
'lib/tilt.rb', 'lib/tilt/mapping.rb', 'lib/tilt/template.rb',
'-',
'*.md', 'docs/*.md',
]

t.options <<
'--no-private' <<
'--protected' <<
'-m' << 'markdown' <<
'--asset' << 'docs/common.css:css/common.css'
end
rescue LoadError
end

task :man do
Expand Down

0 comments on commit faba03c

Please sign in to comment.