lib/sassc/rails/railtie.rb in sassc-rails-1.0.0 vs lib/sassc/rails/railtie.rb in sassc-rails-1.1.0

- old
+ new

@@ -9,10 +9,13 @@ # Emit scss files during stylesheet generation of scaffold config.sass.preferred_syntax = :scss # Initialize the load paths to an empty array config.sass.load_paths = [] + # Display line comments above each selector as a debugging aid + config.sass.line_comments = true + # Set the default stylesheet engine # It can be overridden by passing: # --stylesheet_engine=sass # to the rails generate command config.app_generators.stylesheet_engine config.sass.preferred_syntax @@ -33,11 +36,11 @@ app.config.generators.hide_namespace alt_syntax # Override stylesheet engine to the preferred syntax config.app_generators.stylesheet_engine syntax - # Establish configuration defaults that are evironmental in nature + # Establish configuration defaults that are environmental in nature # if config.sass.full_exception.nil? # # Display a stack trace in the css output when in development-like environments. # config.sass.full_exception = app.config.consider_all_requests_local # end @@ -51,13 +54,11 @@ app.assets.register_engine '.scss', SassC::Rails::ScssTemplate end end initializer :setup_compression, group: :all do |app| - app.config.assets.css_compressor = nil - if !Rails.env.development? - app.config.assets.css_compressor ||= :sass + app.config.assets.css_compressor = :sass unless app.config.assets.has_key?(:css_compressor) else # Use expanded output instead of the sass default of :nested unless specified app.config.sass.style ||= :expanded end end