Skip to content

Commit

Permalink
Require Gulp 4
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Nov 6, 2018
1 parent 4fd98eb commit a576ff2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ module.exports = (plugins, options) => {
cb(null, file);
})
.catch(error => {
// TODO: Remove this setImmediate when Gulp 4 is targeted
setImmediate(cb, new PluginError(PLUGIN_NAME, error, {fileName: file.path}));
cb(new PluginError(PLUGIN_NAME, error, {fileName: file.path}));
});
}, cb => {
const percent = totalBytes > 0 ? (totalSavedBytes / totalBytes) * 100 : 0;
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,8 @@
"imagemin-jpegtran": "^6.0.0",
"imagemin-optipng": "^6.0.0",
"imagemin-svgo": "^7.0.0"
},
"peerDependencies": {
"gulp": ">=4"
}
}

0 comments on commit a576ff2

Please sign in to comment.