Skip to content
This repository has been archived by the owner on Dec 24, 2020. It is now read-only.

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudhead committed Nov 19, 2009
2 parents d75f50a + 923fcb8 commit 6b49573
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions bin/lessc
Expand Up @@ -49,6 +49,10 @@ opts = OptionParser.new do |o|
o.on("--no-color", "suppress color in output") do
options[:color] = false
end

o.on('--verbose', 'show success messages when using growl') do
options[:verbose] = true
end

# Compression needs a proper algorithm
#
Expand Down
6 changes: 4 additions & 2 deletions lib/less/command.rb
Expand Up @@ -60,8 +60,10 @@ def parse new = false
File.open( @destination, "w" ) do |file|
file.write css
end
print "#{o('* ' + (new ? 'Created' : 'Updated'), :green)} " +
"#{@destination.split('/').last}\n: " if watch?

act, file = (new ? 'Created' : 'Updated'), @destination.split('/').last
print "#{o("* #{act}", :green)} #{file}\n: " if watch?
Growl.notify "#{act} #{file}", :title => 'LESS' if @options[:growl] && @options[:verbose]
rescue Errno::ENOENT => e
abort "#{e}"
rescue SyntaxError => e
Expand Down

0 comments on commit 6b49573

Please sign in to comment.