lib/md2man/rakefile.rb in md2man-2.0.0 vs lib/md2man/rakefile.rb in md2man-2.0.1

- old
+ new

@@ -65,11 +65,13 @@ if html_file_body =~ %r{<p>.+?\s-\s+(.+?)</p>} $1.gsub(/<.+?>/, '') # strip HTML tags end end -file 'man/index.html' => webs do |t| +directory 'man' + +file 'man/index.html' => ['man'] + webs do |t| buffer = ['<div class="container-fluid">'] webs.sort.group_by {|web| web.pathmap('%d').sub('man/', '') }.each do |subdir, dir_webs| buffer << %{<h2 id="#{subdir}">#{subdir}</h2>} dir_webs.each do |web| name = parse_manpage_name.call(web) @@ -84,11 +86,11 @@ title = t.name.pathmap('%X') output = wrap_html_template.call(title, content, nil) File.open(t.name, 'w') {|f| f << output } end -file 'man/style.css' => __FILE__.pathmap('%X/style.css') do |t| - cp t.prerequisites.first, t.name if t.needed? +file 'man/style.css' => ['man', __FILE__.pathmap('%X/style.css')] do |t| + cp t.prerequisites.last, t.name if t.needed? end mkds.zip(webs).each do |src, dst| render_file_task.call src, dst, lambda {|input| require 'md2man/html/engine'