Class: Middleman::EmbermanExtension
- Inherits:
-
Extension
- Object
- Extension
- Middleman::EmbermanExtension
- Defined in:
- lib/emberman/extension.rb
Instance Method Summary collapse
- #after_configuration ⇒ Object
-
#initialize(app, options_hash = {}, &block) ⇒ EmbermanExtension
constructor
A new instance of EmbermanExtension.
Constructor Details
#initialize(app, options_hash = {}, &block) ⇒ EmbermanExtension
Returns a new instance of EmbermanExtension.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/emberman/extension.rb', line 8 def initialize(app, ={}, &block) super app_dir = .app_dir app.configure :development do activate :ember end app.configure :build do activate :ember set :ember_variant, :production ignore File.join js_dir, app_dir, '*' end end |
Instance Method Details
#after_configuration ⇒ Object
24 25 26 27 28 29 |
# File 'lib/emberman/extension.rb', line 24 def after_configuration templates_dir = File.join .app_dir, 'templates' app.sprockets.engines['.handlebars'].[:key_name_proc] = proc do |t| t.sub(%r~^#{templates_dir}/~, "") end end |