Use imagemin in your broccoli build pipeline
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test
.gitattributes
.gitignore
.jshintrc
.travis.yml
Brocfile.js
LICENSE.md
README.md
index.js
package.json

README.md

broccoli-imagemin

NPM Build Status Dependency Status

Information

Packagebroccoli-imagemin
Description Use imagemin in your broccoli build pipeline

More information about the image minifier, imagemin can be found at https://github.com/kevva/imagemin. Whereas information about Broccoli which is the building asset pipeline this is for can be found at https://github.com/joliss/broccoli.

Usage

Example from the included test Brocfile.js

'use strict';

// Require imagemin so it can minify your images
var imagemin = require('./index');

// Make a tree using a string that points to the image directory
var imageTree = 'test/images';

// Create some options to pass into imagemin when minifying your images
var options = {
		interlaced: true,
		optimizationLevel: 3,
		progressive: true,
		lossyPNG: false
};

// Minify the images.
imageTree = imagemin(imageTree, options);

// Export the tree which is now holds the optimised images.
module.exports = imageTree;

Tests

> npm install -g broccoli-cli
> npm install -g mocha
> npm test

Or

> npm install -g broccoli-cli
> npm install -g mocha
> broccoli build temp
> mocha