sprity / grunt-sprity

Grunt task for generating css sprites and corresponding stylesheets.
MIT License
2 stars 1 forks source link

base64 usage #1

Open mike-hanson opened 9 years ago

mike-hanson commented 9 years ago

Hi I have switched from css-sprite as recommended. I had a grunt task working fine with css-sprite for some time. Since switching I am seeing different behaviour and it not seeming to work as config examples show.

Here is my task config

sprity: { options: { processor: 'css', out: 'build/css/app/', base64: true }, tree: { options: { prefix: 'tree-icon', style: 'tree.sprites.css' }, src: ['src/css/treesprites/.png'], dest: 'build/css/app/tree.sprites' }, buttons: { options: { prefix: 'button-icon', style: 'button.sprites.css' }, src: ['src/css/buttonsprites/.png'], dest: 'build/css/app/button.sprites' }, items: { options: { prefix: 'item-icon', style: 'item.sprites.css' }, src: ['src/css/itemsprites/*.png'], dest: 'build/css/app/item.sprites' } },

This is working but it still generates the .png files at dest despite being configured for base64. If I exclude dest the css file does not get generated.

If I try the example base64 config from the home page i.e.

base64: { options: { 'base64': true }, src: ['src/images/*'], dest: 'dest/scss/base64.css', }

I get an image file named base64.css.png and no css file.

What am I doing wrong?

mike-hanson commented 9 years ago

p.s. I have the following versions in case that is important

Node: 0.12.7 grunt: 0.4.5 grunt-sprity: 1.0.0 sprity: 1.0.7