Class: Middleman::Renderers::CoffeeScript

Inherits:
Extension
  • Object
show all
Defined in:
lib/middleman-core/renderers/coffee_script.rb

Overview

CoffeeScript Renderer

Defined Under Namespace

Classes: DebuggingCoffeeScriptTemplate

Constant Summary

Constants included from Contracts

Contracts::PATH_MATCHER

Instance Attribute Summary

Attributes inherited from Extension

#app, #options

Instance Method Summary collapse

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

#Contract

Constructor Details

#initialize(app, options = {}, &block) ⇒ CoffeeScript

Setup extension



9
10
11
12
13
14
15
16
17
# File 'lib/middleman-core/renderers/coffee_script.rb', line 9

def initialize(app, options={}, &block)
  super

  # Tell Tilt to use it as well (for inline scss blocks)
  ::Tilt.register 'coffee', DebuggingCoffeeScriptTemplate
  ::Tilt.prefer(DebuggingCoffeeScriptTemplate)

  DebuggingCoffeeScriptTemplate.middleman_app = app
end