first commit

This commit is contained in:
s.golasch
2023-08-01 13:49:46 +02:00
commit 1fc239fd54
20238 changed files with 3112246 additions and 0 deletions

9
build/node_modules/jpegtran-bin/cli.js generated vendored Executable file
View File

@@ -0,0 +1,9 @@
#!/usr/bin/env node
'use strict';
var spawn = require('child_process').spawn;
var jpegtran = require('./');
var input = process.argv.slice(2);
spawn(jpegtran, input, {stdio: 'inherit'})
.on('exit', process.exit);

2
build/node_modules/jpegtran-bin/index.js generated vendored Normal file
View File

@@ -0,0 +1,2 @@
'use strict';
module.exports = require('./lib').path();

21
build/node_modules/jpegtran-bin/lib/index.js generated vendored Normal file
View File

@@ -0,0 +1,21 @@
'use strict';
var path = require('path');
var BinWrapper = require('bin-wrapper');
var pkg = require('../package.json');
var url = 'https://raw.githubusercontent.com/imagemin/jpegtran-bin/v' + pkg.version + '/vendor/';
module.exports = new BinWrapper()
.src(url + 'macos/jpegtran', 'darwin')
.src(url + 'linux/x86/jpegtran', 'linux', 'x86')
.src(url + 'linux/x64/jpegtran', 'linux', 'x64')
.src(url + 'freebsd/x86/jpegtran', 'freebsd', 'x86')
.src(url + 'freebsd/x64/jpegtran', 'freebsd', 'x64')
.src(url + 'sunos/x86/jpegtran', 'sunos', 'x86')
.src(url + 'sunos/x64/jpegtran', 'sunos', 'x64')
.src(url + 'win/x86/jpegtran.exe', 'win32', 'x86')
.src(url + 'win/x64/jpegtran.exe', 'win32', 'x64')
.src(url + 'win/x86/libjpeg-62.dll', 'win32', 'x86')
.src(url + 'win/x64/libjpeg-62.dll', 'win32', 'x64')
.dest(path.join(__dirname, '../vendor'))
.use(process.platform === 'win32' ? 'jpegtran.exe' : 'jpegtran');

42
build/node_modules/jpegtran-bin/lib/install.js generated vendored Normal file
View File

@@ -0,0 +1,42 @@
'use strict';
var path = require('path');
var BinBuild = require('bin-build');
var log = require('logalot');
var bin = require('./');
var args = [
'-copy', 'none',
'-optimize',
'-outfile', path.join(__dirname, '../test/fixtures/test-optimized.jpg'),
path.join(__dirname, '../test/fixtures/test.jpg')
];
bin.run(args, function (err) {
if (err) {
log.warn(err.message);
log.warn('jpegtran pre-build test failed');
log.info('compiling from source');
var cfg = [
'./configure --disable-shared',
'--prefix="' + bin.dest() + '" --bindir="' + bin.dest() + '"'
].join(' ');
var builder = new BinBuild()
.cmd('touch configure.ac aclocal.m4 configure Makefile.am Makefile.in')
.src('https://downloads.sourceforge.net/project/libjpeg-turbo/1.5.1/libjpeg-turbo-1.5.1.tar.gz')
.cmd(cfg)
.cmd('make install');
return builder.run(function (err) {
if (err) {
log.error(err.stack);
return;
}
log.success('jpegtran built successfully');
});
}
log.success('jpegtran pre-build test passed successfully');
});

21
build/node_modules/jpegtran-bin/license generated vendored Normal file
View 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.

96
build/node_modules/jpegtran-bin/package.json generated vendored Normal file
View File

@@ -0,0 +1,96 @@
{
"_args": [
[
"jpegtran-bin@3.2.0",
"/Users/asciidisco/Desktop/asciidisco.com/build"
]
],
"_from": "jpegtran-bin@3.2.0",
"_id": "jpegtran-bin@3.2.0",
"_inBundle": false,
"_integrity": "sha1-9g7PSumZwL2tLp+83ytvCYHnops=",
"_location": "/jpegtran-bin",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "jpegtran-bin@3.2.0",
"name": "jpegtran-bin",
"escapedName": "jpegtran-bin",
"rawSpec": "3.2.0",
"saveSpec": null,
"fetchSpec": "3.2.0"
},
"_requiredBy": [
"/imagemin-jpegtran"
],
"_resolved": "https://registry.npmjs.org/jpegtran-bin/-/jpegtran-bin-3.2.0.tgz",
"_spec": "3.2.0",
"_where": "/Users/asciidisco/Desktop/asciidisco.com/build",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"bin": {
"jpegtran": "cli.js"
},
"bugs": {
"url": "https://github.com/imagemin/jpegtran-bin/issues"
},
"dependencies": {
"bin-build": "^2.0.0",
"bin-wrapper": "^3.0.0",
"logalot": "^2.0.0"
},
"description": "jpegtran (part of libjpeg-turbo) bin-wrapper that makes it seamlessly available as a local dependency",
"devDependencies": {
"bin-check": "^3.0.0",
"compare-size": "^1.0.1",
"mkdirp": "^0.5.0",
"mocha": "^2.2.4",
"rimraf": "^2.3.2",
"xo": "*"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js",
"cli.js",
"lib",
"test"
],
"homepage": "https://github.com/imagemin/jpegtran-bin#readme",
"keywords": [
"compress",
"image",
"img",
"jpeg",
"jpg",
"minify",
"optimize"
],
"license": "MIT",
"maintainers": [
{
"name": "Kevin Mårtensson",
"email": "kevinmartensson@gmail.com",
"url": "github.com/kevva"
},
{
"name": "Shinnosuke Watanabe",
"url": "github.com/shinnn"
}
],
"name": "jpegtran-bin",
"repository": {
"type": "git",
"url": "git+https://github.com/imagemin/jpegtran-bin.git"
},
"scripts": {
"postinstall": "node lib/install.js",
"test": "xo && mocha --timeout 100000"
},
"version": "3.2.0"
}

38
build/node_modules/jpegtran-bin/readme.md generated vendored Normal file
View File

@@ -0,0 +1,38 @@
# jpegtran-bin [![Build Status](https://travis-ci.org/imagemin/jpegtran-bin.svg?branch=master)](https://travis-ci.org/imagemin/jpegtran-bin)
> libjpeg-turbo is a derivative of libjpeg that uses SIMD instructions (MMX, SSE2, NEON) to accelerate baseline JPEG compression and decompression on x86, x86-64, and ARM systems. On such systems, libjpeg-turbo is generally 2-4x as fast as the unmodified version of libjpeg, all else being equal.
## Install
```
$ npm install --save jpegtran-bin
```
## Usage
```js
var execFile = require('child_process').execFile;
var jpegtran = require('jpegtran-bin');
execFile(jpegtran, ['-outfile', 'output.jpg', 'input.jpg'], function (err) {
console.log('Image minified!');
});
```
## CLI
```
$ npm install --global jpegtran-bin
```
```
$ jpegtran --help
```
## License
MIT © [imagemin](https://github.com/imagemin)

Binary file not shown.

After

Width:  |  Height:  |  Size: 927 B

BIN
build/node_modules/jpegtran-bin/test/fixtures/test.jpg generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

77
build/node_modules/jpegtran-bin/test/test.js generated vendored Normal file
View File

@@ -0,0 +1,77 @@
'use strict';
/* eslint-env mocha */
var assert = require('assert');
var execFile = require('child_process').execFile;
var fs = require('fs');
var path = require('path');
var BinBuild = require('bin-build');
var binCheck = require('bin-check');
var compareSize = require('compare-size');
var mkdirp = require('mkdirp');
var rimraf = require('rimraf');
var tmp = path.join(__dirname, 'tmp');
beforeEach(function () {
mkdirp.sync(tmp);
});
afterEach(function () {
rimraf.sync(tmp);
});
it('rebuild the jpegtran binaries', function (cb) {
var cfg = [
'./configure --disable-shared',
'--prefix="' + tmp + '" --bindir="' + tmp + '"'
].join(' ');
new BinBuild()
.src('https://downloads.sourceforge.net/project/libjpeg-turbo/1.5.1/libjpeg-turbo-1.5.1.tar.gz')
.cmd(cfg)
.cmd('make install')
.run(function (err) {
if (err) {
cb(err);
return;
}
assert(fs.statSync(path.join(tmp, 'jpegtran')).isFile());
cb();
});
});
it('return path to binary and verify that it is working', function () {
var args = [
'-outfile', path.join(tmp, 'test.jpg'),
path.join(__dirname, 'fixtures/test.jpg')
];
return binCheck(require('../'), args).then(assert);
});
it('minify a JPG', function (cb) {
var src = path.join(__dirname, 'fixtures/test.jpg');
var dest = path.join(tmp, 'test.jpg');
var args = [
'-outfile', dest,
src
];
execFile(require('../'), args, function (err) {
if (err) {
cb(err);
return;
}
compareSize(src, dest, function (err, res) {
if (err) {
cb(err);
return;
}
assert(res[dest] < res[src]);
cb();
});
});
});

BIN
build/node_modules/jpegtran-bin/vendor/jpegtran generated vendored Executable file

Binary file not shown.