Comparing version 0.4.9 to 1.0.0
11
cli.js
@@ -8,2 +8,3 @@ #!/usr/bin/env node | ||
var pkg = require('./package.json'); | ||
var stdin = require('get-stdin'); | ||
@@ -115,11 +116,5 @@ /** | ||
} else { | ||
var ret = []; | ||
process.stdin.on('data', function (data) { | ||
ret.push(data); | ||
stdin(function (data) { | ||
run(data); | ||
}); | ||
process.stdin.on('end', function () { | ||
run(Buffer.concat(ret)); | ||
}); | ||
} |
21
index.js
@@ -74,7 +74,9 @@ 'use strict'; | ||
if (!file || file.contents.length === 0) { | ||
return cb(); | ||
cb(); | ||
return; | ||
} | ||
if (err) { | ||
return cb(err); | ||
cb(err); | ||
return; | ||
} | ||
@@ -86,3 +88,4 @@ | ||
if (err) { | ||
return cb(err); | ||
cb(err); | ||
return; | ||
} | ||
@@ -126,3 +129,4 @@ | ||
file.contents = src; | ||
return cb(null, file); | ||
cb(null, file); | ||
return; | ||
} | ||
@@ -132,3 +136,4 @@ | ||
if (err) { | ||
return cb(err); | ||
cb(err); | ||
return; | ||
} | ||
@@ -138,3 +143,4 @@ | ||
if (err) { | ||
return cb(err); | ||
cb(err); | ||
return; | ||
} | ||
@@ -162,3 +168,4 @@ | ||
if (!dest) { | ||
return cb(); | ||
cb(); | ||
return; | ||
} | ||
@@ -165,0 +172,0 @@ |
{ | ||
"name": "imagemin", | ||
"version": "0.4.9", | ||
"version": "1.0.0", | ||
"description": "Minify images", | ||
@@ -36,2 +36,3 @@ "license": "MIT", | ||
"fs-extra": "^0.10.0", | ||
"get-stdin": "^2.0.0", | ||
"image-type": "^0.1.4", | ||
@@ -38,0 +39,0 @@ "nopt": "^3.0.1", |
@@ -8,3 +8,3 @@ # imagemin [![Build Status](https://travis-ci.org/kevva/imagemin.svg?branch=master)](https://travis-ci.org/kevva/imagemin) | ||
```bash | ||
```sh | ||
$ npm install --save imagemin | ||
@@ -119,2 +119,3 @@ ``` | ||
## CLI | ||
@@ -126,3 +127,3 @@ | ||
```bash | ||
```sh | ||
$ imagemin --help | ||
@@ -129,0 +130,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
246
1
153
13
+ Addedget-stdin@^2.0.0
+ Addedget-stdin@2.0.0(transitive)