lib/troy/site.rb in troy-0.0.7 vs lib/troy/site.rb in troy-0.0.8

- old
+ new

@@ -35,17 +35,23 @@ # def export remove_public_dir export_assets export_pages - copy_images + export_files end # # - def copy_images - FileUtils.cp_r(root.join("assets/images"), root.join("public/images")) + def export_files + assets = root.join("assets") + + assets.entries.each do |entry| + basename = entry.to_s + next if [".", "..", "javascripts", "stylesheets"].include?(basename) + FileUtils.cp_r(assets.join(entry), root.join("public/#{basename}")) + end end # # def remove_public_dir @@ -54,15 +60,9 @@ # # def export_pages pages.each(&:save) - end - - # - # - def copy_assets - FileUtils.cp_r(root.join("assets"), root.join("public")) end # # def export_assets