在Roots Toolkit中使用sass autoprefixer

时间:2016-06-10 09:40:46

标签: sass roots-toolkit

我刚刚开始使用root(roots.cx),我真的很喜欢它,但看起来好像是为Stylus设置了一切,我更像是一个sass用户。我已经能够使用root-sass,一切都很好,但我现在需要autoprefixer。

我尝试了与Stylus相同的设置:

sass:
    use: [axis(), rupture(), autoprefixer()]
    sourcemap: true

但是没有用,我检查了协议文档/ scss,并没有太多关于sass及其选项的讨论......如果有的话......

任何帮助表示赞赏! 感谢

1 个答案:

答案 0 :(得分:1)

  • npm install postcss --save
  • npm install autoprefixer --save

然后将master.scss重命名为master.css.scss并将以下内容添加到app.coffee

autoprefixer = require 'autoprefixer'

module.exports =

  postcss:
    use: [
      autoprefixer
    ]

这是sample repository

如果您有其他问题,请告诉我们。