Created
June 18, 2012 08:52
-
-
Save yachi/2947542 to your computer and use it in GitHub Desktop.
sprokets compile debug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Sprockets | |
class StaticCompiler | |
# def compile | |
# manifest = {} | |
# env.each_logical_path do |logical_path| | |
# next unless compile_path?(logical_path) | |
# if asset = env.find_asset(logical_path) | |
# manifest[logical_path] = write_asset(asset) | |
# end | |
# end | |
# write_manifest(manifest) if @manifest | |
# end | |
def compile | |
manifest = {} | |
env.each_logical_path do |logical_path| | |
time = Time.now | |
next unless compile_path?(logical_path) | |
if asset = env.find_asset(logical_path) | |
manifest[logical_path] = write_asset(asset) | |
end | |
time_used = Time.now - time | |
puts "#{logical_path} %.1f" % time_used if time_used > 1.0 | |
end | |
write_manifest(manifest) if @manifest | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment