Respect the --quiet option with sprite logging

This commit is contained in:
Chris Eppstein 2011-09-19 18:18:38 -07:00
parent 28daff6771
commit 71e5d28a29
2 changed files with 4 additions and 3 deletions

View File

@ -20,6 +20,7 @@ The Documentation for the [latest preview release](http://beta.compass-style.org
* font-files helper: Stop requiring font type when the type can be guessed from URL
* inline-font-files: actually works now
* Upgrade CSS3 Pie to 1.0beta5
* log sprite generation and removal to the console
0.12.alpha.0 (8/30/2011)

View File

@ -60,13 +60,13 @@ module Compass
Compass.configuration.run_sprite_generated(engine.canvas)
save!
else
options[:compass][:logger].record(:unchanged, relativize(filename))
options[:compass][:logger].record(:unchanged, relativize(filename)) unless options[:quiet]
end
end
def cleanup_old_sprites
Dir[File.join(Compass.configuration.images_path, "#{path}-*.png")].each do |file|
options[:compass][:logger].record(:remove, relativize(file))
options[:compass][:logger].record(:remove, relativize(file)) unless options[:quiet]
FileUtils.rm file
end
end
@ -97,7 +97,7 @@ module Compass
def save!
FileUtils.mkdir_p(File.dirname(filename))
saved = engine.save(filename)
options[:compass][:logger].record(:create, relativize(filename))
options[:compass][:logger].record(:create, relativize(filename)) unless options[:quiet]
Compass.configuration.run_sprite_saved(filename)
saved
end