Broccoli Imagemin Plugin
![License](https://img.shields.io/npm/l/broccoli-image-min.svg)
Broccoli plugin for minifying .jpg, .png, .svg and .gif with imagemin.
Examples
const BroccoliImageMin = require('broccoli-image-min')
const minified = new BroccoliImageMin('app', {
include: ['images/**/*.(jpg|png)']
})
module.exports = minified
const BroccoliImageMin = require('broccoli-image-min')
const minified = new BroccoliImageMin('app/images', {
include: ['**/*.(jpg|png)']
})
module.exports = minified
Documentation
new BroccoliImageMin(inputNodes, options)
The returned output node contains minified images matching the options.include
pattern with their directory structure preserved.
Globbing patterns
Just a quick overview from Globbies documentation
*
matches any number of characters, but not /
?
matches a single character, but not /
**
matches any number of characters, including /
, as long as it's the only thing in a path part{}
allows for a comma-separated list of "or" expressions!
at the beginning of a pattern will negate the match
Various patterns and expected matches.
License
This project is distributed under the MIT license.