lib/hayde/generator.rb in hayde-0.1.4 vs lib/hayde/generator.rb in hayde-0.1.5
- old
+ new
@@ -88,21 +88,18 @@
generate_guide(source, output) if generate?(source, output)
end
end
def copy_assets
- #FileUtils.cp(Dir.glob(File.join(assets_dir, '**', '*')).reject {|file| file !~ /(css|js|png|gif)$/ }, output_dir)
copy(assets_dir, output_dir, /\.$|\.svn/)
end
def copy(source, destination, exclude)
Dir.foreach(source) do |file|
next if exclude && exclude.match(file)
source_file = File.join(source, file)
destination_file = File.join(destination, file)
-
- puts "#{source_file} --> #{destination_file}"
if File.directory?(source_file)
FileUtils.mkdir(destination_file) if !File.directory?(destination_file)
copy(source_file, destination_file, exclude)
else