Module: Middleman::Renderers::Sass
- Defined in:
- lib/middleman-core/renderers/sass.rb
Overview
Sass renderer
Defined Under Namespace
Classes: SassPlusCSSFilenameTemplate, ScssPlusCSSFilenameTemplate
Class Method Summary collapse
-
.registered(app) ⇒ Object
(also: included)
Once registered.
Class Method Details
.registered(app) ⇒ Object Also known as: included
Once registered
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/middleman-core/renderers/sass.rb', line 13 def registered(app) # Default sass options app.set :sass, {} # Location of SASS .sass-cache directory. # @return [String] # set :sass_cache_path, "/tmp/middleman-app-name/sass-cache" app.set(:sass_cache_path) { File.join(app.root_path, '.sass-cache') } # runtime compile of path app.before_configuration do template_extensions :scss => :css, :sass => :css end # Tell Tilt to use it as well (for inline sass blocks) ::Tilt.register 'sass', SassPlusCSSFilenameTemplate ::Tilt.prefer(SassPlusCSSFilenameTemplate) # Tell Tilt to use it as well (for inline scss blocks) ::Tilt.register 'scss', ScssPlusCSSFilenameTemplate ::Tilt.prefer(ScssPlusCSSFilenameTemplate) end |