Created
May 5, 2013 18:23
-
-
Save j-mcnally/5521675 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Middleman | |
| module Emblem | |
| class << self | |
| def registered(app, options={}) | |
| require "barber-emblem" | |
| require "middleman-emblem/sprockets-template" | |
| app.after_configuration do | |
| set :emblem_ext, "emblem" if emblem_ext.nil? | |
| set :emblem_dir, "templates" if emblem_ext.nil? | |
| ::Sprockets.register_engine ".#{emblem_ext}", Middleman::Emblem::Template | |
| spenv = ::Sprockets::Environment.new(root) | |
| spenv.append_path("#{source_dir}/#{emblem_dir}"); | |
| end | |
| end | |
| alias :included :registered | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What I need to do is to find a way to get the :emblem_dir through to the Middleman::Emblem::Template instance that the Sprockets gem creates...