gulp-autoprefixer
Advanced tools
Comparing version 6.0.0 to 6.1.0
24
index.js
@@ -9,6 +9,6 @@ 'use strict'; | ||
module.exports = opts => { | ||
return through.obj((file, enc, cb) => { | ||
module.exports = options => { | ||
return through.obj((file, encoding, callback) => { | ||
if (file.isNull()) { | ||
cb(null, file); | ||
callback(null, file); | ||
return; | ||
@@ -18,15 +18,15 @@ } | ||
if (file.isStream()) { | ||
cb(new PluginError('gulp-autoprefixer', 'Streaming not supported')); | ||
callback(new PluginError('gulp-autoprefixer', 'Streaming not supported')); | ||
return; | ||
} | ||
postcss(autoprefixer(opts)).process(file.contents.toString(), { | ||
postcss(autoprefixer(options)).process(file.contents.toString(), { | ||
map: file.sourceMap ? {annotation: false} : false, | ||
from: file.path, | ||
to: file.path | ||
}).then(res => { | ||
file.contents = Buffer.from(res.css); | ||
}).then(result => { | ||
file.contents = Buffer.from(result.css); | ||
if (res.map && file.sourceMap) { | ||
const map = res.map.toJSON(); | ||
if (result.map && file.sourceMap) { | ||
const map = result.map.toJSON(); | ||
map.file = file.relative; | ||
@@ -37,3 +37,3 @@ map.sources = map.sources.map(() => file.relative); | ||
const warnings = res.warnings(); | ||
const warnings = result.warnings(); | ||
@@ -44,3 +44,3 @@ if (warnings.length > 0) { | ||
setImmediate(cb, null, file); | ||
setImmediate(callback, null, file); | ||
}).catch(error => { | ||
@@ -54,3 +54,3 @@ const cssError = error.name === 'CssSyntaxError'; | ||
// Prevent stream unhandled exception from being suppressed by Promise | ||
setImmediate(cb, new PluginError('gulp-autoprefixer', error, { | ||
setImmediate(callback, new PluginError('gulp-autoprefixer', error, { | ||
fileName: file.path, | ||
@@ -57,0 +57,0 @@ showStack: !cssError |
{ | ||
"name": "gulp-autoprefixer", | ||
"version": "6.0.0", | ||
"version": "6.1.0", | ||
"description": "Prefix CSS", | ||
@@ -33,16 +33,16 @@ "license": "MIT", | ||
"dependencies": { | ||
"autoprefixer": "^9.1.3", | ||
"autoprefixer": "^9.5.1", | ||
"fancy-log": "^1.3.2", | ||
"plugin-error": "^1.0.1", | ||
"postcss": "^7.0.2", | ||
"through2": "^2.0.0", | ||
"vinyl-sourcemaps-apply": "^0.2.0" | ||
"through2": "^3.0.1", | ||
"vinyl-sourcemaps-apply": "^0.2.1" | ||
}, | ||
"devDependencies": { | ||
"ava": "*", | ||
"ava": "^1.4.1", | ||
"gulp-sourcemaps": "^2.6.0", | ||
"p-event": "^2.1.0", | ||
"p-event": "^2.3.1", | ||
"vinyl": "^2.1.0", | ||
"xo": "*" | ||
"xo": "^0.24.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5301
+ Addedreadable-stream@3.6.2(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedstring_decoder@1.3.0(transitive)
+ Addedthrough2@3.0.2(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removedisarray@1.0.0(transitive)
- Removedprocess-nextick-args@2.0.1(transitive)
- Removedreadable-stream@2.3.8(transitive)
- Removedsafe-buffer@5.1.2(transitive)
- Removedstring_decoder@1.1.1(transitive)
- Removedthrough2@2.0.5(transitive)
- Removedxtend@4.0.2(transitive)
Updatedautoprefixer@^9.5.1
Updatedthrough2@^3.0.1