angularjs - 从 grunt-autoprefixer 迁移到 grunt-postcss

标签 angularjs node.js gruntjs

只要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-更新配置

那么我应该修改Gruntfile.js。所以实际上我有这个部分:

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

我的问题:

  1. 您能确认卸载/安装部分吗?
  2. 如何迁移配置?

最佳答案

为您和将来要迁移的任何人编写了迁移指南,请引用:

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

关于angularjs - 从 grunt-autoprefixer 迁移到 grunt-postcss,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31458518/

相关文章:

css - 悬停时更改 md-icon 和 md-button

node.js - 我无法使用 express 框架解决 nodejs 中的错误

node.js - Bower 安装因 module_not_found 而失败

javascript - 我如何在 ng-repeat 中使用 ng-change

javascript - 在 ng-repeat 中使用 ng-click 和 ng-hide/show,Angular

angularjs - 运行时依赖注入(inject)?

Nginx 节点和 WEBrick 配置

javascript - 通过nodejs gm库中的URL加载字体

node.js - 将 Node.js 应用程序部署到 Heroku 时出现应用程序错误

javascript - 使用 grunt 从 browserify 生成源映射