first commit
This commit is contained in:
9
build/node_modules/advpng-bin/cli.js
generated
vendored
Executable file
9
build/node_modules/advpng-bin/cli.js
generated
vendored
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
|
||||
var spawn = require('child_process').spawn;
|
||||
var advpng = require('./');
|
||||
var input = process.argv.slice(2);
|
||||
|
||||
spawn(advpng, input, {stdio: 'inherit'})
|
||||
.on('exit', process.exit);
|
||||
2
build/node_modules/advpng-bin/index.js
generated
vendored
Normal file
2
build/node_modules/advpng-bin/index.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
'use strict';
|
||||
module.exports = require('./lib').path();
|
||||
13
build/node_modules/advpng-bin/lib/index.js
generated
vendored
Normal file
13
build/node_modules/advpng-bin/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
'use strict';
|
||||
|
||||
var path = require('path');
|
||||
var BinWrapper = require('bin-wrapper');
|
||||
var pkg = require('../package.json');
|
||||
var url = 'https://raw.github.com/imagemin/advpng-bin/v' + pkg.version + '/vendor/';
|
||||
|
||||
module.exports = new BinWrapper()
|
||||
.src(url + 'osx/advpng', 'darwin')
|
||||
.src(url + 'linux/advpng', 'linux')
|
||||
.src(url + 'win32/advpng.exe', 'win32')
|
||||
.dest(path.join(__dirname, '../vendor'))
|
||||
.use(process.platform === 'win32' ? 'advpng.exe' : 'advpng');
|
||||
30
build/node_modules/advpng-bin/lib/install.js
generated
vendored
Normal file
30
build/node_modules/advpng-bin/lib/install.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
'use strict';
|
||||
|
||||
var BinBuild = require('bin-build');
|
||||
var log = require('logalot');
|
||||
var bin = require('./');
|
||||
|
||||
bin.run(['--version'], function (err) {
|
||||
if (err) {
|
||||
log.warn(err.message);
|
||||
log.warn('advpng pre-build test failed');
|
||||
log.info('compiling from source');
|
||||
|
||||
var builder = new BinBuild()
|
||||
.src('http://prdownloads.sourceforge.net/advancemame/advancecomp-1.19.tar.gz')
|
||||
.cmd('autoreconf -fiv')
|
||||
.cmd('./configure --prefix="' + bin.dest() + '" --bindir="' + bin.dest() + '"')
|
||||
.cmd('make install');
|
||||
|
||||
return builder.run(function (err) {
|
||||
if (err) {
|
||||
log.error(err.stack);
|
||||
return;
|
||||
}
|
||||
|
||||
log.success('advpng built successfully');
|
||||
});
|
||||
}
|
||||
|
||||
log.success('advpng pre-build test passed successfully');
|
||||
});
|
||||
21
build/node_modules/advpng-bin/license
generated
vendored
Normal file
21
build/node_modules/advpng-bin/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
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.
|
||||
79
build/node_modules/advpng-bin/package.json
generated
vendored
Normal file
79
build/node_modules/advpng-bin/package.json
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
{
|
||||
"_from": "advpng-bin@^3.0.0",
|
||||
"_id": "advpng-bin@3.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-C9/BQuGos6Sko6K0vexuuyozE2U=",
|
||||
"_location": "/advpng-bin",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "advpng-bin@^3.0.0",
|
||||
"name": "advpng-bin",
|
||||
"escapedName": "advpng-bin",
|
||||
"rawSpec": "^3.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^3.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/imagemin-advpng"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/advpng-bin/-/advpng-bin-3.0.0.tgz",
|
||||
"_shasum": "0bdfc142e1a8b3a4a4a3a2b4bdec6ebb2a331365",
|
||||
"_spec": "advpng-bin@^3.0.0",
|
||||
"_where": "/Users/asciidisco/Desktop/asciidisco.com/build/node_modules/imagemin-advpng",
|
||||
"author": {
|
||||
"name": "1000ch",
|
||||
"email": "shogo.sensui@gmail.com",
|
||||
"url": "http://github.com/1000ch"
|
||||
},
|
||||
"bin": {
|
||||
"advpng": "cli.js"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/imagemin/advpng-bin/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"bin-build": "^2.0.0",
|
||||
"bin-wrapper": "^3.0.0",
|
||||
"logalot": "^2.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "advpng wrapper that makes it seamlessly available as a local dependency",
|
||||
"devDependencies": {
|
||||
"bin-check": "^1.0.0",
|
||||
"compare-size": "^1.0.1",
|
||||
"mkdirp": "^0.5.0",
|
||||
"mocha": "^2.2.4",
|
||||
"rimraf": "^2.3.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"cli.js",
|
||||
"index.js",
|
||||
"lib"
|
||||
],
|
||||
"homepage": "https://github.com/imagemin/advpng-bin#readme",
|
||||
"keywords": [
|
||||
"compress",
|
||||
"image",
|
||||
"img",
|
||||
"minify",
|
||||
"optimize",
|
||||
"png"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "advpng-bin",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/imagemin/advpng-bin.git"
|
||||
},
|
||||
"scripts": {
|
||||
"postinstall": "node lib/install.js",
|
||||
"test": "mocha --timeout 20000"
|
||||
},
|
||||
"version": "3.0.0"
|
||||
}
|
||||
39
build/node_modules/advpng-bin/readme.md
generated
vendored
Normal file
39
build/node_modules/advpng-bin/readme.md
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
# advpng-bin [](https://travis-ci.org/imagemin/advpng-bin)
|
||||
|
||||
> The main purpose of this utility is to recompress png files to get the smallest
|
||||
possible size
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save advpng-bin
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var execFile = require('child_process').execFile;
|
||||
var advpng = require('advpng-bin');
|
||||
|
||||
execFile(advpng, ['--recompress', '--shrink-extra', 'image.png'], function (err) {
|
||||
console.log('Image minified!');
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
## CLI
|
||||
|
||||
```
|
||||
$ npm install --global advpng-bin
|
||||
```
|
||||
|
||||
```
|
||||
$ advpng --help
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [imagemin](https://github.com/imagemin)
|
||||
BIN
build/node_modules/advpng-bin/vendor/advpng
generated
vendored
Executable file
BIN
build/node_modules/advpng-bin/vendor/advpng
generated
vendored
Executable file
Binary file not shown.
Reference in New Issue
Block a user