lib/wp_fire/compiler.rb in wp-fire-0.0.3 vs lib/wp_fire/compiler.rb in wp-fire-0.0.4

- old
+ new

@@ -10,15 +10,22 @@ if not basename[0].eql?"_" and extname.eql?".scss" sass_engine = Sass::Engine.for_file filename, {} File.open File.join(build_path, basename), "w" do |f| f.puts sass_engine.to_css end + elsif extname.eql?".css" + FileUtils.cp filename, File.join(build_path, File.basename(filename)) elsif extname.eql?".coffee" File.open File.join(build_path, basename), "w" do |f| f.puts CoffeeScript.compile File.read(filename) end + elsif extname.eql?".js" + FileUtils.cp filename, File.join(build_path, File.basename(filename)) elsif extname.eql?".php" FileUtils.cp filename, File.join(build_path, File.basename(filename)) + elsif [".jpg",".jpeg",".png",".gif",".ico"].include?(extname) + Dir.mkdir File.join(build_path, "images") unless File.directory?(File.join(build_path, "images")) + FileUtils.cp filename, File.join(build_path, "images", File.basename(filename)) end end def self.compile_all(filenames, build_path) files = [] \ No newline at end of file