Coffeescript module
This commit is contained in:
parent
b1d6b94302
commit
a4b68335d4
|
@ -3,7 +3,8 @@
|
||||||
###
|
###
|
||||||
|
|
||||||
# CoffeeScript Support
|
# CoffeeScript Support
|
||||||
require "coffee_script"
|
require "middleman-more/renderers/coffee_script"
|
||||||
|
Middleman::Application.register Middleman::Renderers::CoffeeScript
|
||||||
|
|
||||||
# Haml Support
|
# Haml Support
|
||||||
require "middleman-more/renderers/haml"
|
require "middleman-more/renderers/haml"
|
||||||
|
|
22
middleman-more/lib/middleman-more/renderers/coffee_script.rb
Normal file
22
middleman-more/lib/middleman-more/renderers/coffee_script.rb
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
module Middleman
|
||||||
|
module Renderers
|
||||||
|
|
||||||
|
# CoffeeScript Renderer
|
||||||
|
module CoffeeScript
|
||||||
|
|
||||||
|
# Setup extension
|
||||||
|
class << self
|
||||||
|
# Once registered
|
||||||
|
def registered(app)
|
||||||
|
# Require gem
|
||||||
|
require "coffee_script"
|
||||||
|
|
||||||
|
app.before_configuration do
|
||||||
|
template_extensions :coffee => :js
|
||||||
|
end
|
||||||
|
end
|
||||||
|
alias :included :registered
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue