Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

broccoli-image-min

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli-image-min

Broccoli plugin for minifying .jpg, .png, .svg and .gif with imagemin

  • 2.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Broccoli Imagemin Plugin

Build Status Dependency Status DevDependency Status Npm downloads Npm Version Git tag Github issues License

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)

  • inputNodes: A single input node, an array of input nodes or a string pointing to a folder.

  • options:

    • include: An array of Regexp patterns

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.

Keywords

FAQs

Package last updated on 13 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc