Skip to content

Commit

Permalink
fix(docs): update docs with disableDefaults: true
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmad Nassri committed Mar 18, 2018
1 parent d3abf4f commit a4c6753
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,25 @@
npm install --production --save metalsmith-imagemin
```

## Available plugins and defaults
### Available plugins

For installed plugins see index.js.
```
imagemin-advpng
imagemin-giflossy
imagemin-gifsicle
imagemin-gm
imagemin-jpegoptim
imagemin-jpeg-recompress
imagemin-jpegtran
imagemin-mozjpeg
imagemin-optipng
imagemin-pngcrush
imagemin-pngout
imagemin-pngquant
imagemin-svgo
imagemin-webp
imagemin-zopfli
```

## API

Expand Down Expand Up @@ -46,9 +62,16 @@ const metalsmith = new Metalsmith(__dirname)

### To disable/replace a default plugin

By default there are 4 plugins enabled (see index.js).
By default there are 4 plugins enabled:

```
`gifsicle`
`jpegrecompress`
`pngquant`
`svgo`
```

To disable a default plugin use `pluginname: null`.
To disable a default plugin use `pluginname: null`, to disable **ALL** the default plugins use: `disableDefaults: true`

E.g. disable default `jpegrecompress` and replace it with another plugin (`mozjpeg`):

Expand Down

0 comments on commit a4c6753

Please sign in to comment.