Class: Middleman::Renderers::Sass
- Defined in:
- lib/middleman-core/renderers/sass.rb
Overview
Sass renderer
Defined Under Namespace
Classes: SassPlusCSSFilenameTemplate, ScssPlusCSSFilenameTemplate
Constant Summary
Constants included from Contracts
Instance Attribute Summary
Attributes inherited from Extension
Instance Method Summary collapse
-
#initialize(app, options = {}, &block) ⇒ Sass
constructor
Setup extension.
Methods inherited from Extension
activated_extension, #add_exposed_to_context, #after_build, #after_configuration, #after_extension_activated, after_extension_activated, #before_build, #before_configuration, clear_after_extension_callbacks, config, define_setting, expose_to_application, expose_to_config, expose_to_template, global_config, helpers, #manipulate_resource_list, option, #ready, resources
Methods included from Contracts
Constructor Details
#initialize(app, options = {}, &block) ⇒ Sass
Setup extension
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/middleman-core/renderers/sass.rb', line 19 def initialize(app, ={}, &block) super logger.info '== Preferring use of LibSass' if defined?(::SassC) app.files.ignore :sass_cache, :source, /(^|\/)\.sass-cache\// # 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) require 'middleman-core/renderers/sass_functions' end |