book/lib/tasks/tasks.rake in glyph-0.4.0 vs book/lib/tasks/tasks.rake in glyph-0.4.1
- old
+ new
@@ -17,33 +17,30 @@
end
end
namespace :generate do
desc "Create output for h3rald.com integration"
- task :h3rald => [:web] do
+ task :h3rald => [:web5] do
dir = Glyph::PROJECT/'output/h3rald'
(dir/"glyph/book").mkpath
# Copy files in subdir
(dir).find do |i|
if i.file? then
- next if
- i.to_s.match(Regexp.escape(dir/'glyph')) ||
- i.to_s.match(Regexp.escape(dir/'images')) ||
- i.to_s.match(Regexp.escape(dir/'styles'))
+ next if i.to_s.match(Regexp.escape(dir/'glyph'))
dest = dir/"glyph/book/#{i.relative_path_from(Glyph::PROJECT/dir)}"
src = i.to_s
Pathname.new(dest).parent.mkpath
file_copy src, dest
end
end
- # Remove files
+ # Remove files from output dir
dir.children.each do |c|
- unless [dir/'glyph', dir/'images', dir/'styles'].include? c then
+ unless c == dir/'glyph' then
c.directory? ? c.rmtree : c.unlink
end
end
- (dir/'images/glyph/glyph.eps').unlink
- (dir/'images/glyph/glyph.svg').unlink
+ (dir/'glyph/book/images/glyph/glyph.eps').unlink
+ (dir/'glyph/book/images/glyph/glyph.svg').unlink
# Create project page
project = Glyph.filter %{layout:project[
@contents[#{file_load(Glyph::PROJECT/'text/introduction.glyph')}]
]}
file_write dir/"glyph.textile", project