哟。
我的webapp中有一个简单的spriteSet:
@import "icons/*.png";
@include all-icons-sprites;
Grunt或Compass生成sprited图像没有任何问题,在我的图像文件夹中,在我的yeoman项目中配置(更具体地说 - YO。新的)
现在图像已经很好地生成了,但是在我的css输出文件中对它的引用是错误的。他在我的app文件夹中搜索,例如domain.com\app\images\
我用Google搜索并看到grunt-contrib-compass
为许多图片网址提供了api,例如[httpGeneratedImagesPath][1]
,但这些似乎不会出现在我的Yeoman项目中,如果我将它们放入其中,它们会将其粉碎GruntFile.js。
之前有人遇到过这个问题吗?
谢谢。
答案 0 :(得分:2)
答案 1 :(得分:1)
link:https://github.com/yeoman/yeoman/issues/419
主题已解决。以下是对我有用的修改:
<强> Gruntfile.js 强>
compass: {
options: {
...
config: '.compass.rb' //reference for full compass options list
}
}
<强> .compass.rb 强>
images_dir = '/app/images'
generated_images_dir = '/images'