Skip to content

Commit

Permalink
Compressing javascript was lazy and causing errors. No compression fo…
Browse files Browse the repository at this point in the history
…r now.
  • Loading branch information
benschwarz committed Jul 20, 2011
1 parent ecd80a7 commit 7798c44
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions assets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
end
end

# Compress * javascripts to application.js
# Combine javascripts to application.js
Dir.chdir("javascript") do
application = "../public/javascript/application.js"

Dir["**/*.js"].each do |javascript_filepath|
compressed = js_compressor.compress(File.open(javascript_filepath, "r")) + "\n"
File.open(application, "a"){|buffer| buffer << compressed }
uncompressed = File.open(javascript_filepath, "r").read + "\n"
File.open(application, "a"){|buffer| buffer << uncompressed }
end
end

0 comments on commit 7798c44

Please sign in to comment.