first commit
This commit is contained in:
9
build/node_modules/pngquant-bin/cli.js
generated
vendored
Executable file
9
build/node_modules/pngquant-bin/cli.js
generated
vendored
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
var spawn = require('child_process').spawn;
|
||||
var pngquant = require('./');
|
||||
|
||||
var input = process.argv.slice(2);
|
||||
|
||||
spawn(pngquant, input, {stdio: 'inherit'})
|
||||
.on('exit', process.exit);
|
||||
2
build/node_modules/pngquant-bin/index.js
generated
vendored
Normal file
2
build/node_modules/pngquant-bin/index.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
'use strict';
|
||||
module.exports = require('./lib').path();
|
||||
15
build/node_modules/pngquant-bin/lib/index.js
generated
vendored
Normal file
15
build/node_modules/pngquant-bin/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
'use strict';
|
||||
var path = require('path');
|
||||
var BinWrapper = require('bin-wrapper');
|
||||
var pkg = require('../package.json');
|
||||
|
||||
var url = 'https://raw.github.com/imagemin/pngquant-bin/v' + pkg.version + '/vendor/';
|
||||
|
||||
module.exports = new BinWrapper()
|
||||
.src(url + 'macos/pngquant', 'darwin')
|
||||
.src(url + 'linux/x86/pngquant', 'linux', 'x86')
|
||||
.src(url + 'linux/x64/pngquant', 'linux', 'x64')
|
||||
.src(url + 'freebsd/x64/pngquant', 'freebsd', 'x64')
|
||||
.src(url + 'win/pngquant.exe', 'win32')
|
||||
.dest(path.join(__dirname, '../vendor'))
|
||||
.use(process.platform === 'win32' ? 'pngquant.exe' : 'pngquant');
|
||||
35
build/node_modules/pngquant-bin/lib/install.js
generated
vendored
Normal file
35
build/node_modules/pngquant-bin/lib/install.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
'use strict';
|
||||
var BinBuild = require('bin-build');
|
||||
var logalot = require('logalot');
|
||||
var bin = require('./');
|
||||
|
||||
bin.run(['--version'], function (err) {
|
||||
if (err) {
|
||||
logalot.warn(err.message);
|
||||
logalot.warn('pngquant pre-build test failed');
|
||||
logalot.info('compiling from source');
|
||||
|
||||
var libpng = process.platform === 'darwin' ? 'libpng' : 'libpng-dev';
|
||||
var builder = new BinBuild()
|
||||
.src('https://github.com/pornel/pngquant/archive/2.7.1.tar.gz')
|
||||
.cmd('rm ./INSTALL')
|
||||
.cmd('./configure --prefix="' + bin.dest() + '"')
|
||||
.cmd('make install BINPREFIX="' + bin.dest() + '"');
|
||||
|
||||
return builder.run(function (err) {
|
||||
if (err) {
|
||||
err.message = [
|
||||
'pngquant failed to build, make sure that',
|
||||
libpng + ' is installed'
|
||||
].join(' ');
|
||||
|
||||
logalot.error(err.stack);
|
||||
return;
|
||||
}
|
||||
|
||||
logalot.success('pngquant built successfully');
|
||||
});
|
||||
}
|
||||
|
||||
logalot.success('pngquant pre-build test passed successfully');
|
||||
});
|
||||
19
build/node_modules/pngquant-bin/license
generated
vendored
Normal file
19
build/node_modules/pngquant-bin/license
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
Copyright (c) imagemin
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
91
build/node_modules/pngquant-bin/package.json
generated
vendored
Normal file
91
build/node_modules/pngquant-bin/package.json
generated
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
{
|
||||
"_from": "pngquant-bin@^3.0.0",
|
||||
"_id": "pngquant-bin@3.1.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-0STZinWpSH9AwWQLTb/Lsr1aH9E=",
|
||||
"_location": "/pngquant-bin",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "pngquant-bin@^3.0.0",
|
||||
"name": "pngquant-bin",
|
||||
"escapedName": "pngquant-bin",
|
||||
"rawSpec": "^3.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^3.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/imagemin-pngquant"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/pngquant-bin/-/pngquant-bin-3.1.1.tgz",
|
||||
"_shasum": "d124d98a75a9487f40c1640b4dbfcbb2bd5a1fd1",
|
||||
"_spec": "pngquant-bin@^3.0.0",
|
||||
"_where": "/Users/asciidisco/Desktop/asciidisco.com/build/node_modules/imagemin-pngquant",
|
||||
"author": {
|
||||
"name": "Kevin Mårtensson",
|
||||
"email": "kevinmartensson@gmail.com",
|
||||
"url": "github.com/kevva"
|
||||
},
|
||||
"bin": {
|
||||
"pngquant": "cli.js"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/imagemin/pngquant-bin/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"bin-build": "^2.0.0",
|
||||
"bin-wrapper": "^3.0.0",
|
||||
"logalot": "^2.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "pngquant wrapper that makes it seamlessly available as a local dependency",
|
||||
"devDependencies": {
|
||||
"bin-check": "^2.0.0",
|
||||
"compare-size": "^1.0.0",
|
||||
"mkdirp": "^0.5.0",
|
||||
"mocha": "^2.2.4",
|
||||
"rimraf": "^2.3.2",
|
||||
"xo": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"cli.js",
|
||||
"index.js",
|
||||
"lib"
|
||||
],
|
||||
"homepage": "https://github.com/imagemin/pngquant-bin#readme",
|
||||
"keywords": [
|
||||
"compress",
|
||||
"image",
|
||||
"img",
|
||||
"minify",
|
||||
"optimize",
|
||||
"png"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
{
|
||||
"name": "Shinnosuke Watanabe",
|
||||
"url": "github.com/shinnn"
|
||||
}
|
||||
],
|
||||
"name": "pngquant-bin",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/imagemin/pngquant-bin.git"
|
||||
},
|
||||
"scripts": {
|
||||
"postinstall": "node lib/install.js",
|
||||
"test": "xo && mocha"
|
||||
},
|
||||
"version": "3.1.1"
|
||||
}
|
||||
38
build/node_modules/pngquant-bin/readme.md
generated
vendored
Normal file
38
build/node_modules/pngquant-bin/readme.md
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
# pngquant-bin [](https://travis-ci.org/imagemin/pngquant-bin)
|
||||
|
||||
> pngquant is a command-line utility for converting 24/32-bit PNG images to paletted (8-bit) PNGs. The conversion reduces file sizes significantly (often as much as 70%) and preserves full alpha transparency.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save pngquant-bin
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const execFile = require('child_process').execFile;
|
||||
const pngquant = require('pngquant-bin');
|
||||
|
||||
execFile(pngquant, ['-o', 'output.png', 'input.png'], err => {
|
||||
console.log('Image minified!');
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
## CLI
|
||||
|
||||
```
|
||||
$ npm install --global pngquant-bin
|
||||
```
|
||||
|
||||
```
|
||||
$ pngquant --help
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [imagemin](https://github.com/imagemin)
|
||||
BIN
build/node_modules/pngquant-bin/vendor/pngquant
generated
vendored
Executable file
BIN
build/node_modules/pngquant-bin/vendor/pngquant
generated
vendored
Executable file
Binary file not shown.
Reference in New Issue
Block a user