nDmitry / grunt-postcss

Apply several post-processors to your CSS using PostCSS.
MIT License
419 stars 57 forks source link

Autoprefixer doesn't prefix, but does create the file. #107

Open lextoc opened 7 years ago

lextoc commented 7 years ago

Trying to get autoprefixer to work on an open source project I want to contribute to. I'm not that experienced with Grunt, I can't get it to work. For now I managed to let sass:postcss create an autoprefixed.min.css, but it doesn't prefix.

I've got a stackoverflow with a small bounty on it about this, should that motivate anyone to help me out. http://stackoverflow.com/questions/41535175/grunt-grunt-postcss-autoprefixer-not-working

I've been fiddling around a little bit and my sass.js is a little different now, but it still doesn't work ... :

module.exports = {
  dev: {
    options: {
      style: 'expanded',
      compass: true
    },
    files: {
      'public/styles/css/site.min.css': 'public/styles/site.sass',
    }
  },
  postcss: {
    options: {
      map: false,
      processors: [
        require('autoprefixer')({
          browsers: ['last 8 versions']
        })
      ]
    },
    files: {
      'public/styles/css/autoprefixed.css': 'public/styles/css/site.min.css'
    }
  }
};