Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 1.15 KB

README.md

File metadata and controls

45 lines (31 loc) · 1.15 KB

sbt-postcss

sbt-web plugin that runs Autoprefixer using postcss to post-process CSS and add vendor prefixes to rules by Can I Use.

To use the latest version from Github, add the following to the project/plugins.sbt of your project:

    lazy val root = project.in(file(".")).dependsOn(sbtPostcss)
    lazy val sbtPostcss = uri("git://github.com/kotonoha/sbt-postcss")

Your project's build file also needs to enable sbt-web plugins. For example with build.sbt:

    lazy val root = (project in file(".")).enablePlugins(SbtWeb)

Declare the execution order of the asset pipeline:

pipelineStages in Assets := Seq(postcss)

You will need to add following lines to your package.json:

{
  "devDependencies": {
    "autoprefixer": "^6.3.7",
    "postcss-cli": "^2.5.2"
  }
}

To include all CSS files for post processing

includeFilter in postcss := GlobFilter("*.css")

Acknowledgments

This plugin was built on matthewrennie/sbt-autoprefixer.