pngcrush-bin
Advanced tools
Comparing version
{ | ||
"name": "pngcrush-bin", | ||
"version": "0.1.12", | ||
"version": "0.1.13", | ||
"description": "Pngcrush wrapper that makes it seamlessly available as a local dependency on OS X, Linux", | ||
@@ -18,5 +18,4 @@ "keywords": [ | ||
}, | ||
"main": "lib/pngcrush", | ||
"bin": { | ||
"pngcrush": "bin/pngcrush.js" | ||
"pngcrush": "cli.js" | ||
}, | ||
@@ -28,4 +27,4 @@ "repository": { | ||
"scripts": { | ||
"test": "mocha ./test/test-build.js ./test/test-path.js", | ||
"postinstall": "node ./lib/build.js" | ||
"test": "mocha --reporter spec --timeout 0", | ||
"postinstall": "node index.js" | ||
}, | ||
@@ -39,13 +38,16 @@ "engines": { | ||
"dependencies": { | ||
"bin-wrapper": "~0.1.9", | ||
"chalk": "~0.4.0" | ||
"bin-build": "^0.1.0", | ||
"bin-wrapper": "^0.3.0", | ||
"chalk": "^0.4.0" | ||
}, | ||
"devDependencies": { | ||
"mocha": "~1.17.1" | ||
"bin-check": "^0.1.0", | ||
"mocha": "^1.18.2", | ||
"rimraf": "^2.2.6" | ||
}, | ||
"files": [ | ||
"bin", | ||
"lib", | ||
"vendor" | ||
"cli.js", | ||
"index.js", | ||
"test" | ||
] | ||
} |
# [node-pngcrush-bin](https://npmjs.org/package/pngcrush-bin) | ||
## About | ||
[pngcrush](http://pmt.sourceforge.net/pngcrush/) Node.js wrapper that optimize PNG images. | ||
> Pngcrush is an optimizer for PNG (Portable Network Graphics) files. It can be run from a commandline in an MSDOS window, or from a UNIX or LINUX commandline. | ||
> Pngcrush is an optimizer for PNG (Portable Network Graphics) files. It can be run from a commandline in an MSDOS window, or from a UNIX or LINUX commandline. | ||
> Its main purpose is to reduce the size of the PNG IDAT datastream by trying various compression levels an PNG filter methods. It also can be used to remove unwanted ancillary chunks, or to add certain chunks including gAMA, tRNS, iCCP, and textual chunks. | ||
@@ -18,12 +16,16 @@ | ||
```sh | ||
$ npm install -g pngcrush-bin | ||
$ npm install --save pngcrush-bin | ||
``` | ||
## Usage with Node.js | ||
## Usage | ||
```js | ||
var execFile = require('child_process').execFile; | ||
var pngcrushPath = require('pngcrush-bin').path; | ||
var pngcrush = require('pngcrush-bin').path; | ||
execFile(pngcrushPath, ['-reduce', '-brute', 'dest.png'], function() { | ||
execFile(pngcrush, ['-reduce', '-brute', 'input.png', 'output.png'], function (err) { | ||
if (err) { | ||
throw err; | ||
} | ||
console.log('Image minified'); | ||
@@ -36,2 +38,3 @@ }); | ||
This is licensed under BSD. | ||
[pngcrush](http://pmt.sourceforge.net/pngcrush/) is licensed under OSI Approved License. |
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
106
92.73%39
8.33%2
-50%139556
-83.77%3
50%3
200%7
-22.22%2
Infinity%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated