Skip to content

Commit

Permalink
lazy medias
Browse files Browse the repository at this point in the history
  • Loading branch information
athoune committed Mar 22, 2011
1 parent 6c2a0c8 commit dd89447
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
9 changes: 6 additions & 3 deletions rakelib/book.rake
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@ require 'filter'

namespace :book do
include BookOfMark
directory 'build/medias'

def info txt
puts "[Info] #{txt}"
end


task :medias

task :medias do
FileList['source/**/*.png'].each do |media|
cp media, 'build/medias/'
end
end

desc "Clean build files"
task :clean do
Expand Down
1 change: 0 additions & 1 deletion rakelib/html.rake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ namespace :book do
namespace :html do
directory 'build/raw_html'
directory 'build/one_html'
directory 'build/medias'

task :raw_html => 'build/raw_html' do
md2html do |doc|
Expand Down
7 changes: 0 additions & 7 deletions rakelib/latex.rake
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@ namespace :book do
end
end
end
MaRuKu::Out::Latex::Medias.each do |media|
if File.exist? "source/#{media}"
create "source/#{media}" => "build/medias/#{media}" do
cp "source/#{media}", "build/medias/#{media}"
end
end
end
end
task :latex => :raw_latex do
create book.path => 'build/raw_latex/__index.tex' do
Expand Down

0 comments on commit dd89447

Please sign in to comment.