neoswf
neoswf

Reputation: 4760

Compass sprite, Yeoman, Grunt & image reference don`t combine well together

Yo.

I got a simple spriteSet in my webapp:

@import "icons/*.png";
@include all-icons-sprites;

Grunt or Compass generating the sprited image without any problems, inside my images folder, that was configured inside my yeoman project (more specifically- YO. The new one)

Now the image been generated well, but the reference to it, inside my css output file, is wrong. He searches in my app folder, something like domain.com\app\images\

I googled and saw that grunt-contrib-compass provides api for many images urls, like [httpGeneratedImagesPath][1], but these don`t seems to appear inside my Yeoman project, and they crush it down if I place them inside the GruntFile.js.

Anyone encountered this problem before?

Thank you.

Upvotes: 0

Views: 843

Answers (2)

neoswf
neoswf

Reputation: 4760

link: https://github.com/yeoman/yeoman/issues/419

Subject resolved. Here are the modifications that worked for me:

Gruntfile.js

compass: {
        options: {
            ...
            config: '.compass.rb' //reference for full compass options list
        }
    }

.compass.rb

images_dir = '/app/images'
generated_images_dir =  '/images'

Upvotes: 1

Related Questions