mickro
mickro

Reputation: 891

migration from grunt-autoprefixer to grunt-postcss

As long as grunt-autoprefixer is deprecated I want to migrate to grunt-postcss.

I m quite new in the grunt world (and dependencies) I could not find what I needed in documentation to do the migration.

To process I need three steps:

1- uninstall grunt-autoprefixer

I suppose I've to run npm uninstall grunt-autoprefixer --save-dev first

2- install grunt-postcss

Then a npm install grunt-postcss --save-dev

but not sure at all if I've to do a npm install grunt-postcss pixrem autoprefixer-core cssnano

3- update the config

Then I should modify the Gruntfile.js. So actually I've this section:

autoprefixer: {
  options: {
    browsers: ['last 1 version']
  },
  dist: {
    files: [{
      expand: true,
      cwd: '.tmp/styles/',
      src: '{,*/}*.css',
      dest: '.tmp/styles/'
    }]
  }
},

My questions:

  1. can you confirm uninstall / install part?
  2. how to migrate the config?

Upvotes: 1

Views: 743

Answers (1)

Dmitry Nikitenko
Dmitry Nikitenko

Reputation: 96

Wrote a migration guide for you and anyone who will migrate in the future, please refer:

https://github.com/nDmitry/grunt-postcss#how-to-migrate-from-grunt-autoprefixer

Upvotes: 1

Related Questions