从grunt-autoprefixer迁移到grunt-postcss
只要grunt-autoprefixer已被弃用,我想迁移到grunt-postcss 。
我在grunt
世界(和依赖关系)是一个相当新的东西,我找不到我需要在文档中进行迁移的东西。
处理我需要三个步骤:
1-卸载grunt-autoprefixer
我想我必须先运行npm uninstall grunt-autoprefixer --save-dev
2-安装grunt-postcss
然后npm install grunt-postcss --save-dev
但不知道如果我要做一个npm install grunt-postcss pixrem autoprefixer-core cssnano
3-更新configuration
然后我应该修改Gruntfile.js
。 所以其实我有这个部分:
autoprefixer: { options: { browsers: ['last 1 version'] }, dist: { files: [{ expand: true, cwd: '.tmp/styles/', src: '{,*/}*.css', dest: '.tmp/styles/' }] } },
我的问题:
- 你可以确认卸载/安装部分?
- 如何迁移configuration?
为您和任何将来移民的人写了一份移民指南,请参考:
https://github.com/nDmitry/grunt-postcss#how-to-migrate-from-grunt-autoprefixer