Fix combo of compass-import-once and sass-globs. Closes middleman/middleman-sprockets#56
This commit is contained in:
parent
8eabe4d354
commit
2dd87bab74
|
@ -1,6 +1,35 @@
|
|||
require 'sass'
|
||||
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 Renderers
|
||||
# Sass renderer
|
||||
|
|
|
@ -22,7 +22,7 @@ Gem::Specification.new do |s|
|
|||
s.add_dependency("middleman-sprockets", ">= 3.1.2")
|
||||
s.add_dependency("haml", [">= 4.0.5"])
|
||||
s.add_dependency("sass", [">= 3.2.17", "< 4.0"])
|
||||
s.add_dependency("compass-import-once", ["~> 1.0.4"])
|
||||
s.add_dependency("compass-import-once", ["1.0.4"])
|
||||
s.add_dependency("compass", [">= 0.12.4"])
|
||||
s.add_dependency("uglifier", ["~> 2.5"])
|
||||
s.add_dependency("coffee-script", ["~> 2.2.0"])
|
||||
|
|
Loading…
Reference in a new issue