Sass 用指南针精灵破解缓存

Sass 用指南针精灵破解缓存,sass,compass-sass,Sass,Compass Sass,我正在使用compass中的图像进行缓存破坏: asset_cache_buster do |http_path, real_path| if File.exists?(real_path) hash = Digest::MD5.file(real_path.path).hexdigest "v=%s" % hash[0,5] end end 使用image\u url()将附加v 我如何使用精灵完成同样的行为 @import '../images/navbar/*.p

我正在使用compass中的图像进行缓存破坏:

asset_cache_buster do |http_path, real_path|
  if File.exists?(real_path)
    hash = Digest::MD5.file(real_path.path).hexdigest
    "v=%s" % hash[0,5]
  end
end
使用
image\u url()
将附加
v

我如何使用精灵完成同样的行为

@import '../images/navbar/*.png';
@include navbar-sprite;
我尝试了此操作,但出现了罗盘语法错误:

@import image-url('../images/navbar/*.png');

我能做什么

指南针spring的默认行为几乎就是这样,只是它更改了文件名,而不是更改了查询字符串。检查文件系统和/或输出css。您是否没有看到带有url的生成图像,如
/images/navbar-s34fe0604ab.png
?该名称将在
/images/navbar/
中的任何文件更改时更改