gulp-pngmin
v0.2.1
Published
Optimize PNG image plugin for Gulp.
Downloads
494
Readme
gulp-pngmin
Gulp plugin for optimize PNG.
Required: pngquant
USAGE
Install (Mac OS with Homebrew)
$ brew install pngquant
$ npm install gulp-pngmin --save-dev
Install (CentOS)
$ yum install pngquant
$ npm install gulp-pngmin --save-dev
Example
var gulp = require('gulp');
var pngmin = require('gulp-pngmin');
// Basic usage
gulp.task('pngmin', function() {
gulp.src('src/images/**/*.png')
.pipe(pngmin())
.pipe(gulp.dest('dist/images'));
});
Arguments
1) the number of colors (default: 256)
var gulp = require('gulp');
var pngmin = require('gulp-pngmin');
gulp.task('pngmin', function() {
gulp.src('src/images/**/*.png')
.pipe(pngmin([192]))
.pipe(gulp.dest('dist/images'));
});
License
Copyright (c) 2014 Yusuke Narita Licensed under the MIT license.