lib/sprockets/sass.rb in sprockets-sass-0.4.3 vs lib/sprockets/sass.rb in sprockets-sass-0.5.0
- old
+ new
@@ -5,25 +5,22 @@
module Sprockets
module Sass
autoload :Importer, "sprockets/sass/importer"
- # Global configuration for `Sass::Engine` instances.
- def self.options
- @options ||= {}
+ class << self
+ # Global configuration for `Sass::Engine` instances.
+ attr_accessor :options
+
+ # When false, the asset path helpers provided by
+ # sprockets-helpers will not be added as Sass functions.
+ # `true` by default.
+ attr_accessor :add_sass_functions
end
+
+ @options = {}
+ @add_sass_functions = true
end
- # Register the new templates
register_engine ".sass", Sass::SassTemplate
register_engine ".scss", Sass::ScssTemplate
-
- # Attempt to add the Sass Functions
- begin
- require "sass"
- require "sprockets/sass/functions"
- rescue LoadError
- # fail silently...
- end
end
-
-