Created
September 16, 2015 19:58
-
-
Save elentok/a6f82b90e8c1982f08f6 to your computer and use it in GitHub Desktop.
Middleman + Jade + Bower
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
# ==================================================================== | |
# Bower | |
sprockets.append_path File.join root, 'bower_components' | |
Dir['bower_components/*'].each do |dir| | |
sprockets.import_asset File.basename(dir) | |
end | |
# ==================================================================== | |
# Jade | |
require 'jade-rails' | |
class JadeTemplate < Tilt::Template | |
def prepare; end | |
def evaluate(context, locals, &block) | |
Jade.compile(data, filename: eval_file) | |
end | |
end | |
::Sprockets.register_engine '.jade', JadeTemplate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment