Skip to content

Commit

Permalink
Merge branch 'pr22'
Browse files Browse the repository at this point in the history
* pr22:
  Show Autoprefixer warnings
  Use Autoprefixer via PostCSS
  • Loading branch information
Jeff Escalante committed Jun 3, 2015
2 parents b72731a + 4ec47f0 commit bf1b925
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var ap = require('autoprefixer-core'),
postcss = require('postcss'),
map = require('multi-stage-sourcemap'),
path = require('path');

Expand Down Expand Up @@ -38,7 +39,7 @@ module.exports = function(opts) {
}

// run autoprefixer
var res = ap(opts).process(css, process_opts);
var res = postcss([ap(opts)]).process(css, process_opts);

// if sourcemaps are generated, combine the two
if (res.map && style.sourcemap) {
Expand All @@ -51,6 +52,8 @@ module.exports = function(opts) {
style.sourcemap = JSON.parse(combined_map);
}

res.warnings().forEach(console.error);

// return the css output
return res.css;
});
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
},
"dependencies": {
"autoprefixer-core": "5.x",
"multi-stage-sourcemap": "0.2.x"
"multi-stage-sourcemap": "0.2.x",
"postcss": "4.x"
}
}

0 comments on commit bf1b925

Please sign in to comment.