Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matthewrennie/sbt-autoprefixer
sbt-web plugin that adds vendor-specific prefixes to CSS using Autoprefixer
https://github.com/matthewrennie/sbt-autoprefixer
Last synced: 2 months ago
JSON representation
sbt-web plugin that adds vendor-specific prefixes to CSS using Autoprefixer
- Host: GitHub
- URL: https://github.com/matthewrennie/sbt-autoprefixer
- Owner: matthewrennie
- License: other
- Created: 2014-06-21T19:02:04.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-06-11T22:27:22.000Z (over 9 years ago)
- Last Synced: 2024-08-03T06:01:54.847Z (6 months ago)
- Language: Scala
- Size: 136 KB
- Stars: 4
- Watchers: 5
- Forks: 16
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-sbt-plugins - sbt-autoprefixer
README
sbt-autoprefixer
================[sbt-web](https://github.com/sbt/sbt-web) plugin that uses [Autoprefixer](https://github.com/ai/autoprefixer) to post-process CSS and add vendor prefixes to rules by [Can I Use](http://caniuse.com).
To use the latest version from Github, add the following to the `project/plugins.sbt` of your project:
```scala
lazy val root = project.in(file(".")).dependsOn(sbtAutoprefixer)
lazy val sbtAutoprefixer = uri("git://github.com/matthewrennie/sbt-autoprefixer")
```Your project's build file also needs to enable sbt-web plugins. For example with build.sbt:
```scala
lazy val root = (project in file(".")).enablePlugins(SbtWeb)
```Declare the execution order of the asset pipeline:
```scala
pipelineStages in Assets := Seq(autoprefixer)
```The following option are supported:
Option | Description
--------------------|------------
cascade | Creates nice visual cascade of prefixes. Default: true.
sourceMap | Enables source maps. Default: true.
inlineSourceMap | Enables inline source maps by data:uri to annotation comment. Default: false.
The following sbt code illustrates how to include inline source maps```scala
AutoprefixerKeys.inlineSourceMap in Assets := true
```To include all CSS files for post processing
```scala
includeFilter in autoprefixer := GlobFilter("*.css"),
```If you receive duplicate map errors when using incombination with LESS, turn sourceMapping off