简体   繁体   中英

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM