Skip to content

Commit aacca91

Browse files
committedJan 16, 2020
Require Node.js 10
1 parent 279a91b commit aacca91

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed
 

‎.travis.yml

-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ language: node_js
22
node_js:
33
- '12'
44
- '10'
5-
- '8'

‎index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const defaultPlugins = ['gifsicle', 'mozjpeg', 'optipng', 'svgo'];
1313
const loadPlugin = (plugin, ...args) => {
1414
try {
1515
return require(`imagemin-${plugin}`)(...args);
16-
} catch (error) {
16+
} catch (_) {
1717
log(`${PLUGIN_NAME}: Couldn't load default plugin "${plugin}"`);
1818
}
1919
};
@@ -34,7 +34,7 @@ const getDefaultPlugins = () =>
3434
module.exports = (plugins, options) => {
3535
if (typeof plugins === 'object' && !Array.isArray(plugins)) {
3636
options = plugins;
37-
plugins = null;
37+
plugins = undefined;
3838
}
3939

4040
options = {

‎package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
"description": "Minify PNG, JPEG, GIF and SVG images",
55
"license": "MIT",
66
"repository": "sindresorhus/gulp-imagemin",
7+
"funding": "https://github.com/sponsors/sindresorhus",
78
"author": {
89
"name": "Sindre Sorhus",
910
"email": "sindresorhus@gmail.com",
1011
"url": "sindresorhus.com"
1112
},
1213
"engines": {
13-
"node": ">=8"
14+
"node": ">=10"
1415
},
1516
"scripts": {
1617
"test": "xo && ava"
@@ -35,7 +36,7 @@
3536
"svg"
3637
],
3738
"dependencies": {
38-
"chalk": "^2.4.1",
39+
"chalk": "^3.0.0",
3940
"fancy-log": "^1.3.2",
4041
"imagemin": "^7.0.0",
4142
"plugin-error": "^1.0.1",
@@ -48,7 +49,7 @@
4849
"get-stream": "^5.1.0",
4950
"imagemin-pngquant": "^8.0.0",
5051
"vinyl": "^2.2.0",
51-
"xo": "^0.24.0"
52+
"xo": "^0.25.3"
5253
},
5354
"optionalDependencies": {
5455
"imagemin-gifsicle": "^6.0.1",

‎readme.md

+3-6
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@
44
55
*Issues with the output should be reported on the [`imagemin` issue tracker](https://github.com/imagemin/imagemin/issues).*
66

7-
87
## Install
98

109
```
1110
$ npm install --save-dev gulp-imagemin
1211
```
1312

14-
1513
## Usage
1614

1715
### Basic
@@ -80,7 +78,6 @@ Note that you may come across an older, implicit syntax. In versions < 3, the sa
8078
//
8179
```
8280

83-
8481
## API
8582

8683
Comes bundled with the following **lossless** optimizers:
@@ -98,7 +95,7 @@ Unsupported files are ignored.
9895

9996
#### plugins
10097

101-
Type: `Array`<br>
98+
Type: `Array`\
10299
Default: `[imagemin.gifsicle(), imagemin.mozjpeg(), imagemin.optipng(), imagemin.svgo()]`
103100

104101
[Plugins](https://www.npmjs.com/browse/keyword/imageminplugin) to use. This will completely overwrite all the default plugins. So, if you want to use custom plugins and you need some of defaults too, then you should pass default plugins as well. Note that the default plugins come with good defaults and should be sufficient in most cases. See the individual plugins for supported options.
@@ -109,7 +106,7 @@ Type: `object`
109106

110107
##### verbose
111108

112-
Type: `boolean`<br>
109+
Type: `boolean`\
113110
Default: `false`
114111

115112
Enabling this will log info on every image passed to `gulp-imagemin`:
@@ -121,7 +118,7 @@ gulp-imagemin: ✔ image2.png (saved 91 B - 0.4%)
121118

122119
##### silent
123120

124-
Type: `boolean`<br>
121+
Type: `boolean`\
125122
Default: `false`
126123

127124
Don't log the number of images that have been minified.

0 commit comments

Comments
 (0)
Please sign in to comment.