module Middleman::Bower

Constants

VERSION

Public Class Methods

included(app, options_hash={}, &block)
Alias for: registered
registered(app, options_hash={}, &block) click to toggle source

Register bower assets into the middleman sprockets asset manifest.

# File lib/middleman/bower.rb, line 8
def registered(app, options_hash={}, &block)
  # Create a bower manifest that we'll use to configure sprockets.
  bower = ::Sprockets::Bower::Manifest.load(File.join(app.root, '.bowerrc'))
  # We have to wait for Sprockets to be initialized by Middleman
  # before we can add the bower assets path to the Sprockets path, so
  # lets set that up in the after_configuration callback.
  app.after_configuration do
    bower.configure sprockets
  end
end
Also aliased as: included