Add a new configuration property to disable sass warnings: disable_warnings

This commit is contained in:
Chris Eppstein 2010-11-14 23:45:44 -08:00
parent ca7563e3ba
commit d7da056fb1
4 changed files with 12 additions and 3 deletions

View File

@ -202,6 +202,13 @@ command line will override the corresponding settings in your configuration file
approach. approach.
</td> </td>
</tr> </tr>
<tr>
<td style="vertical-align:top;"><code>disable_warnings</code> </td>
<td style="vertical-align:top;">Boolean </td>
<td style="vertical-align:top;">
Set this to true to silence deprecation warnings.
</td>
</tr>
<tr> <tr>
<td style="vertical-align:top;"><code>sass_options</code> </td> <td style="vertical-align:top;"><code>sass_options</code> </td>
<td style="vertical-align:top;">Hash </td> <td style="vertical-align:top;">Hash </td>

View File

@ -47,10 +47,10 @@ module Compass
def new_compiler_instance(additional_options = {}) def new_compiler_instance(additional_options = {})
compiler_opts = Compass.sass_engine_options compiler_opts = Compass.sass_engine_options
compiler_opts.merge!(:quiet => options[:quiet], compiler_opts.merge!(:force => options[:force],
:force => options[:force],
:sass_files => explicit_sass_files, :sass_files => explicit_sass_files,
:dry_run => options[:dry_run]) :dry_run => options[:dry_run])
compiler_opts[:quiet] = options[:quiet] if options[:quiet]
compiler_opts.merge!(additional_options) compiler_opts.merge!(additional_options)
Compass::Compiler.new(working_path, Compass::Compiler.new(working_path,
Compass.configuration.sass_path, Compass.configuration.sass_path,

View File

@ -36,7 +36,8 @@ module Compass
:asset_cache_buster, :asset_cache_buster,
:line_comments, :line_comments,
:color_output, :color_output,
:preferred_syntax :preferred_syntax,
:disable_warnings
].flatten ].flatten
end end

View File

@ -46,6 +46,7 @@ module Compass
engine_opts[:line_comments] = line_comments engine_opts[:line_comments] = line_comments
engine_opts[:cache] = cache engine_opts[:cache] = cache
engine_opts[:cache_location] = cache_path engine_opts[:cache_location] = cache_path
engine_opts[:quiet] = disable_warnings if disable_warnings
engine_opts.merge!(sass_options || {}) engine_opts.merge!(sass_options || {})
end end