Add lib/asset to sprocket load path

This commit is contained in:
Steel Fu 2012-04-03 15:18:53 -07:00
parent 129c2845f8
commit a85678f040

View file

@ -16,7 +16,7 @@ module Middleman::CoreExtensions::Sprockets
app.ready do app.ready do
# Add any gems with (vendor|app|.)/assets/javascripts to paths # Add any gems with (vendor|app|.)/assets/javascripts to paths
# also add similar directories from project root (like in rails) # also add similar directories from project root (like in rails)
root_paths = [%w{ app }, %w{ assets }, %w{ vendor }, %w{ app assets }, %w{ vendor assets }] root_paths = [%w{ app }, %w{ assets }, %w{ vendor }, %w{ app assets }, %w{ vendor assets }, %w{ lib }, %w{ lib assets }]
try_paths = root_paths.map {|rp| File.join(rp, 'javascripts') } + try_paths = root_paths.map {|rp| File.join(rp, 'javascripts') } +
root_paths.map {|rp| File.join(rp, 'stylesheets') } root_paths.map {|rp| File.join(rp, 'stylesheets') }