Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add autoprefixer support. #2

Open
wants to merge 1 commit into from

2 participants

@Leglaw

No description provided.

@niclashoyer niclashoyer commented on the diff
src/index.coffee
@@ -23,7 +24,8 @@ module.exports = (env, callback) ->
success: (css) ->
if config.minify isnt false
css = ccss.process css, env.config['clean-css']
- callback null, new Buffer css
+ ap_css = autoprefixer('> 1%', 'last 4 versions', 'Firefox ESR', 'Opera 12.1').process(css).css
@niclashoyer Owner

the options for autoprefixer are hard coded for your use case, aren't they? It would be better to load them from the configuration (env.config) at this point.

@Leglaw
Leglaw added a note

Yes that's a good idea. I'll submit another pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 6, 2014
  1. @Leglaw

    Add autoprefixer support.

    Leglaw authored
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 2 deletions.
  1. +2 −1  package.json
  2. +3 −1 src/index.coffee
View
3  package.json
@@ -19,7 +19,8 @@
},
"devDependencies": {
"coffee-script": "~1.6.3",
- "wintersmith": "~2.0.5"
+ "wintersmith": "~2.0.5",
+ "autoprefixer": "1.1.x"
},
"peerDependencies": {
"wintersmith": "~2.0.5"
View
4 src/index.coffee
@@ -2,6 +2,7 @@
fs = require 'fs'
sass = require 'node-sass'
ccss = require 'clean-css'
+autoprefixer = require 'autoprefixer'
module.exports = (env, callback) ->
@@ -23,7 +24,8 @@ module.exports = (env, callback) ->
success: (css) ->
if config.minify isnt false
css = ccss.process css, env.config['clean-css']
- callback null, new Buffer css
+ ap_css = autoprefixer('> 1%', 'last 4 versions', 'Firefox ESR', 'Opera 12.1').process(css).css
@niclashoyer Owner

the options for autoprefixer are hard coded for your use case, aren't they? It would be better to load them from the configuration (env.config) at this point.

@Leglaw
Leglaw added a note

Yes that's a good idea. I'll submit another pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ callback null, new Buffer ap_css
error: (err) ->
callback new Error err
Something went wrong with that request. Please try again.