2createStudio / postcss-sprites

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

Example of usage with grunt-postcss #18

Closed neilhem closed 9 years ago

neilhem commented 9 years ago

Does somebody add how-to configure example of this plugin with grunt-postcss?

vvasilev- commented 9 years ago

The configuration of the plugin for grunt-postcss should be fairly simple. You can check the docs https://github.com/nDmitry/grunt-postcss#usage.

grunt.initConfig({
  postcss: {
    options: {
      processors: [
        require('postcss-sprites')({
          // your config here
        })
      ]
    },
    dist: {
      src: 'css/*.css'
    }
  }
});
neilhem commented 9 years ago

Hi, thanks for a help. I have the same config as shown in above example. Is there way create sprite image right after postcss task has been executed? Seems like it happens later, in my case after some tasks which run after postcss.

vvasilev- commented 9 years ago

Can you give me an example of your config for grunt to make some tests?