Set compass environment in plugin based on RAILS_ENV (currently used to set line_comments option).

Fix line_comments option for plugin.

Signed-off-by: Chris Eppstein <chris@eppsteins.net>
This commit is contained in:
Lee Nussbaum 2009-04-10 02:20:57 +08:00 committed by Chris Eppstein
parent baa734df25
commit d5f44081ef
2 changed files with 2 additions and 1 deletions

View File

@ -143,7 +143,7 @@ module Compass
end end
plugin_opts = {:template_location => locations} plugin_opts = {:template_location => locations}
plugin_opts[:style] = output_style if output_style plugin_opts[:style] = output_style if output_style
engine_opts[:line_comments] = default_line_comments if environment plugin_opts[:line_comments] = default_line_comments if environment
plugin_opts plugin_opts
end end

View File

@ -83,6 +83,7 @@ Emit compiled stylesheets to #{recommended_location}/? (Y/n) }
%Q{require 'compass' %Q{require 'compass'
# If you have any compass plugins, require them here. # If you have any compass plugins, require them here.
Compass.configuration.parse(File.join(RAILS_ROOT, "config", "compass.config")) Compass.configuration.parse(File.join(RAILS_ROOT, "config", "compass.config"))
Compass.configuration.environment = RAILS_ENV.to_sym
Compass.configure_sass_plugin! Compass.configure_sass_plugin!
} }
end end