2createStudio / postcss-sprites

Generate sprites from stylesheets.
MIT License
413 stars 50 forks source link

SpritePath with variable. #21

Closed fenvenfen closed 9 years ago

fenvenfen commented 9 years ago

Hi, i have problem with spritePath. This is me postcss-sprite

var opts = { stylesheetPath: 'wwwroot/css/main.css', spritePath: 'wwwroot/i/sprite.png', retina: true }

require('postcss-sprites')({ stylesheetPath: '<%= opts.stylesheetPath %>', spritePath: '<%= opts.spritePath %>', }),

And when i run this task [postcss-sprites] => Error: Error: EEXIST, file already exists

vvasilev- commented 9 years ago

Hi.

I think that your configuration should be something like this:

var opts = {
    styleSheetPath: 'wwwroot/css',
    spritePath    : 'wwwroot/i/sprite.png',
    retina        : true
}

Your styleSheetPath should point to a folder not to a file.