Merge remote-tracking branch 'origin/v3-stable'
Conflicts: middleman-core/lib/middleman-core/core_extensions/rendering.rb middleman/middleman.gemspec
This commit is contained in:
commit
5f9dec3dc8
|
@ -67,7 +67,12 @@ module Middleman
|
||||||
|
|
||||||
# Allow hooks to manipulate the result after render
|
# Allow hooks to manipulate the result after render
|
||||||
@app.class.callbacks_for_hook(:after_render).each do |callback|
|
@app.class.callbacks_for_hook(:after_render).each do |callback|
|
||||||
|
# Uber::Options::Value doesn't respond to call
|
||||||
|
if callback.respond_to?(:call)
|
||||||
content = callback.call(content, path, locs, template_class)
|
content = callback.call(content, path, locs, template_class)
|
||||||
|
elsif callback.respond_to?(:evaluate)
|
||||||
|
content = callback.evaluate(self, content, path, locs, template_class)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
output = ::ActiveSupport::SafeBuffer.new ''
|
output = ::ActiveSupport::SafeBuffer.new ''
|
||||||
|
|
|
@ -1,6 +1,35 @@
|
||||||
require 'sass'
|
require 'sass'
|
||||||
require 'compass/import-once'
|
require 'compass/import-once'
|
||||||
|
|
||||||
|
GLOB = /\*|\[.+\]/
|
||||||
|
|
||||||
|
# Hack around broken sass globs when combined with import-once
|
||||||
|
# Targets compass-import-once 1.0.4
|
||||||
|
# Tracking issue: https://github.com/chriseppstein/compass/issues/1529
|
||||||
|
module Compass
|
||||||
|
module ImportOnce
|
||||||
|
module Importer
|
||||||
|
def find_relative(uri, base, options, *args)
|
||||||
|
if uri =~ GLOB
|
||||||
|
force_import = true
|
||||||
|
else
|
||||||
|
uri, force_import = handle_force_import(uri)
|
||||||
|
end
|
||||||
|
maybe_replace_with_dummy_engine(super(uri, base, options, *args), options, force_import)
|
||||||
|
end
|
||||||
|
|
||||||
|
def find(uri, options, *args)
|
||||||
|
if uri =~ GLOB
|
||||||
|
force_import = true
|
||||||
|
else
|
||||||
|
uri, force_import = handle_force_import(uri)
|
||||||
|
end
|
||||||
|
maybe_replace_with_dummy_engine(super(uri, options, *args), options, force_import)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
module Middleman
|
module Middleman
|
||||||
module Renderers
|
module Renderers
|
||||||
# Sass renderer
|
# Sass renderer
|
||||||
|
|
|
@ -24,6 +24,7 @@ Gem::Specification.new do |s|
|
||||||
s.add_dependency('middleman-sprockets', '>= 3.1.2')
|
s.add_dependency('middleman-sprockets', '>= 3.1.2')
|
||||||
s.add_dependency('haml', ['>= 4.0.5'])
|
s.add_dependency('haml', ['>= 4.0.5'])
|
||||||
s.add_dependency('sass', ['>= 3.3.4'])
|
s.add_dependency('sass', ['>= 3.3.4'])
|
||||||
|
s.add_dependency("compass-import-once", ["1.0.4"])
|
||||||
s.add_dependency('compass', ['>= 1.0.0.alpha.19'])
|
s.add_dependency('compass', ['>= 1.0.0.alpha.19'])
|
||||||
s.add_dependency('uglifier', ['~> 2.5'])
|
s.add_dependency('uglifier', ['~> 2.5'])
|
||||||
s.add_dependency('coffee-script', ['~> 2.2.0'])
|
s.add_dependency('coffee-script', ['~> 2.2.0'])
|
||||||
|
|
Loading…
Reference in a new issue