imagemin
Advanced tools
Comparing version 3.0.0 to 3.1.0
@@ -27,3 +27,3 @@ #!/usr/bin/env node | ||
' -i, --interlaced Interlace gif for progressive rendering', | ||
' -o, --optimizationLevel <number> Select an optimization level between 0 and 7', | ||
' -o, --optimizationLevel <number> Optimization level between 0 and 7', | ||
' -p, --progressive Lossless conversion to progressive' | ||
@@ -30,0 +30,0 @@ ].join('\n') |
12
index.js
@@ -5,4 +5,6 @@ 'use strict'; | ||
var concat = require('concat-stream'); | ||
var EventEmitter = require('events').EventEmitter; | ||
var File = require('vinyl'); | ||
var fs = require('vinyl-fs'); | ||
var inherits = require('util').inherits; | ||
var optional = require('optional'); | ||
@@ -22,2 +24,3 @@ var through = require('through2'); | ||
EventEmitter.call(this); | ||
this.streams = []; | ||
@@ -27,2 +30,8 @@ } | ||
/** | ||
* Inherit from `EventEmitter` | ||
*/ | ||
inherits(Imagemin, EventEmitter); | ||
/** | ||
* Get or set the source files | ||
@@ -79,2 +88,3 @@ * | ||
Imagemin.prototype.run = function (cb) { | ||
var self = this; | ||
cb = cb || function () {}; | ||
@@ -101,2 +111,4 @@ | ||
pipe.on('data', this.emit.bind(this, 'data')); | ||
pipe.on('end', this.emit.bind(this, 'end')); | ||
pipe.on('error', cb); | ||
@@ -103,0 +115,0 @@ pipe.pipe(end); |
{ | ||
"name": "imagemin", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"description": "Minify images", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -170,3 +170,3 @@ # imagemin [![Build Status](http://img.shields.io/travis/imagemin/imagemin.svg?style=flat)](https://travis-ci.org/imagemin/imagemin) [![Build status](https://ci.appveyor.com/api/projects/status/wlnem7wef63k4n1t)](https://ci.appveyor.com/project/ShinnosukeWatanabe/imagemin) | ||
-i, --interlaced Interlace gif for progressive rendering | ||
-o, --optimizationLevel <number> Select an optimization level between 0 and 7 | ||
-o, --optimizationLevel <number> Optimization level between 0 and 7 | ||
-p, --progressive Lossless conversion to progressive | ||
@@ -173,0 +173,0 @@ ``` |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
10535
5
232
0