Put the Sprite importer on the default load paths coming from compass.
This commit is contained in:
parent
28a77171e3
commit
5aac677e77
@ -22,6 +22,8 @@ module Compass
|
||||
plugin_opts[:cache] = cache unless cache.nil?
|
||||
plugin_opts[:cache_location] = cache_path unless cache_path.nil?
|
||||
plugin_opts.merge!(sass_options || {})
|
||||
plugin_opts[:load_paths] ||= []
|
||||
plugin_opts[:load_paths] << Compass::Sprites.new
|
||||
plugin_opts
|
||||
end
|
||||
|
||||
@ -57,6 +59,7 @@ module Compass
|
||||
load_paths << framework.stylesheets_directory if File.exists?(framework.stylesheets_directory)
|
||||
end
|
||||
load_paths += resolve_additional_import_paths
|
||||
load_paths << Compass::Sprites.new
|
||||
load_paths
|
||||
end
|
||||
end
|
||||
|
@ -102,6 +102,16 @@ module Compass
|
||||
File.basename(uri)]
|
||||
end
|
||||
|
||||
def mtime(uri, options)
|
||||
Compass.quick_cache("mtime:#{uri}") do
|
||||
self.path, self.name = Compass::Sprites.path_and_name(uri)
|
||||
glob = File.join(Compass.configuration.images_path, uri)
|
||||
Dir.glob(glob).inject(Time.at(0)) do |max_time, file|
|
||||
(t = File.mtime(file)) > max_time ? t : max_time
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def to_s
|
||||
""
|
||||
end
|
||||
|
@ -33,7 +33,6 @@ describe Compass::Sprites do
|
||||
options[:line_comments] = false
|
||||
options[:style] = :expanded
|
||||
options[:syntax] = :scss
|
||||
options[:load_paths] << Compass::Sprites.new
|
||||
css = Sass::Engine.new(scss, options).render
|
||||
# reformat to fit result of heredoc:
|
||||
" #{css.gsub('@charset "UTF-8";', '').gsub(/\n/, "\n ").strip}\n"
|
||||
|
Loading…
Reference in New Issue
Block a user