Im using the grunt-contrib-compass pluckin, and I just cant get it to behave the way i want, the problem is that the image path in my css file are wrong.
Have been playing around with the parameters but i cant figure it out (sadface)
My folders:
/root
/assets
/css
/images
/sprites <-- generated images
And the configuration in my gruntfile.js
compass: {
dist: {
options: {
sassDir: 'src/scss'
,cssDir: 'assets/css'
,raw: 'preferred_syntax = :sass\n'
,imagesDir: "assets/images/"
//,imagesPath: "assets/images/sprites/"
,generatedImagesDir: "assets/images/sprites/"
,generatedImagesPath: "assets/images/sprites/"
}
}
}
The image url in my css file:
/assets/images/sprites/interface-s04f47928b4.png
But it should really be:
../images/sprites/interface-s04f47928b4.png
so i figured it out (finaly)
,imagesDir: "assets/images/"
,generatedImagesDir: "assets/images/sprites/"
,generatedImagesPath: "assets/images/sprites/"
,httpGeneratedImagesPath: "../images/sprites"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With