Class: Middleman::Renderers::Less
- Defined in:
- lib/middleman-core/renderers/less.rb
Overview
Sass renderer
Defined Under Namespace
Classes: LocalLoadingLessTemplate
Constant Summary
Constants included from Contracts
Instance Attribute Summary
Attributes inherited from Extension
Instance Method Summary collapse
- #after_configuration ⇒ Object
-
#initialize(app, options = {}, &block) ⇒ Less
constructor
A new instance of Less.
Methods inherited from Extension
activated_extension, #add_exposed_to_context, #after_build, 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) ⇒ Less
Returns a new instance of Less.
9 10 11 12 13 14 15 |
# File 'lib/middleman-core/renderers/less.rb', line 9 def initialize(app, ={}, &block) super # Tell Tilt to use it as well (for inline sass blocks) ::Tilt.register 'less', LocalLoadingLessTemplate ::Tilt.prefer(LocalLoadingLessTemplate) end |
Instance Method Details
#after_configuration ⇒ Object
17 18 19 20 21 |
# File 'lib/middleman-core/renderers/less.rb', line 17 def after_configuration app.files.by_type(:source).watchers.each do |source| ::Less.paths << (source.directory + app.config[:css_dir]).to_s end end |