mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
[Sass] [Bin] --quiet affects --watch and --update output too.
This commit is contained in:
parent
21812ac7fa
commit
5bf898ec83
2 changed files with 12 additions and 1 deletions
|
@ -13,6 +13,8 @@
|
|||
* IronRuby compatibility. This is sort of a hack: IronRuby reports its version as 1.9,
|
||||
but it doesn't support the encoding APIs, so we treat it as 1.8 instead.
|
||||
|
||||
* The `--quiet` option now silences informational output from `--update` and `--watch`.
|
||||
|
||||
## 3.0.23
|
||||
|
||||
[Tagged on GitHub](http://github.com/nex3/haml/commit/3.0.23).
|
||||
|
|
|
@ -124,9 +124,18 @@ module Haml
|
|||
# @param color [Symbol] The name of the color to use for this action.
|
||||
# Can be `:red`, `:green`, or `:yellow`.
|
||||
def puts_action(name, color, arg)
|
||||
return if @options[:for_engine][:quiet]
|
||||
printf color(color, "%11s %s\n"), name, arg
|
||||
end
|
||||
|
||||
# Same as \{Kernel.puts}, but doesn't print anything if the `--quiet` option is set.
|
||||
#
|
||||
# @param args [Array] Passed on to \{Kernel.puts}
|
||||
def puts(*args)
|
||||
return if @options[:for_engine][:quiet]
|
||||
Kernel.puts(*args)
|
||||
end
|
||||
|
||||
# Wraps the given string in terminal escapes
|
||||
# causing it to have the given color.
|
||||
# If terminal esapes aren't supported on this platform,
|
||||
|
@ -300,7 +309,7 @@ END
|
|||
'Output style. Can be nested (default), compact, compressed, or expanded.') do |name|
|
||||
@options[:for_engine][:style] = name.to_sym
|
||||
end
|
||||
opts.on('-q', '--quiet', 'Silence warnings during compilation.') do
|
||||
opts.on('-q', '--quiet', 'Silence warnings and status messages during compilation.') do
|
||||
@options[:for_engine][:quiet] = true
|
||||
end
|
||||
opts.on('-g', '--debug-info',
|
||||
|
|
Loading…
Add table
Reference in a new issue