Skip to content

Commit 768f4f6

Browse files
committed
Merge pull request #37 from postcss/simplify-postcsss-execution
#36 simplify postcss call
2 parents b622661 + a2a8ae4 commit 768f4f6

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ module.exports = function (processors, options) {
2323
// Source map is disabled by default
2424
var opts = { map: false }
2525
var attr
26-
var processor = postcss()
2726

2827
// Extend default options
2928
if (options) {
@@ -42,8 +41,7 @@ module.exports = function (processors, options) {
4241
opts.map = { annotation: false }
4342
}
4443

45-
processors.forEach(processor.use.bind(processor))
46-
processor
44+
postcss(processors)
4745
.process(file.contents, opts)
4846
.then(handleResult, handleError)
4947

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"homepage": "https://github.com/postcss/gulp-postcss",
2525
"dependencies": {
2626
"gulp-util": "^3.0.4",
27-
"postcss": "^4.1.7",
27+
"postcss": "^4.1.8",
2828
"vinyl-sourcemaps-apply": "^0.1.4"
2929
},
3030
"devDependencies": {

0 commit comments

Comments
 (0)