Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Aug 18, 2019
1 parent 97cd1c3 commit 92e224a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,13 @@ module.exports = (plugins, options) => {
return;
}

const use = plugins || getDefaultPlugins();
const localPlugins = plugins || getDefaultPlugins();

(async () => {
try {
const data = await imagemin.buffer(file.contents, {use});
const data = await imagemin.buffer(file.contents, {
plugins: localPlugins
});
const originalSize = file.contents.length;
const optimizedSize = data.length;
const saved = originalSize - optimizedSize;
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,23 @@
"dependencies": {
"chalk": "^2.4.1",
"fancy-log": "^1.3.2",
"imagemin": "^7.0.0",
"plugin-error": "^1.0.1",
"imagemin": "^6.1.0",
"plur": "^3.0.1",
"pretty-bytes": "^5.1.0",
"pretty-bytes": "^5.3.0",
"through2-concurrent": "^2.0.0"
},
"devDependencies": {
"ava": "^1.4.1",
"ava": "^2.3.0",
"get-stream": "^5.1.0",
"imagemin-pngquant": "^7.0.0",
"imagemin-pngquant": "^8.0.0",
"vinyl": "^2.2.0",
"xo": "^0.24.0"
},
"optionalDependencies": {
"imagemin-gifsicle": "^6.0.1",
"imagemin-jpegtran": "^6.0.0",
"imagemin-optipng": "^6.0.0",
"imagemin-optipng": "^7.0.0",
"imagemin-svgo": "^7.0.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ $ npm install --save-dev gulp-imagemin
const gulp = require('gulp');
const imagemin = require('gulp-imagemin');

gulp.task('default', () =>
exports.default = () => (
gulp.src('src/images/*')
.pipe(imagemin())
.pipe(gulp.dest('dist/images'))
Expand Down

0 comments on commit 92e224a

Please sign in to comment.