schnee effeckt und fehler Korektur
This commit is contained in:
51
node_modules/gifsicle/lib/install.js
generated
vendored
51
node_modules/gifsicle/lib/install.js
generated
vendored
@@ -1,34 +1,35 @@
|
||||
'use strict';
|
||||
var BinBuild = require('bin-build');
|
||||
var log = require('logalot');
|
||||
var bin = require('./');
|
||||
const path = require('path');
|
||||
const binBuild = require('bin-build');
|
||||
const bin = require('.');
|
||||
|
||||
bin.run(['--version'], function (err) {
|
||||
if (err) {
|
||||
log.warn(err.message);
|
||||
log.warn('gifsicle pre-build test failed');
|
||||
log.info('compiling from source');
|
||||
(async () => {
|
||||
try {
|
||||
await bin.run(['--version']);
|
||||
console.log('gifsicle pre-build test passed successfully');
|
||||
} catch (error) {
|
||||
console.warn(error.message);
|
||||
console.warn('gifsicle pre-build test failed');
|
||||
console.info('compiling from source');
|
||||
|
||||
var cfg = [
|
||||
const config = [
|
||||
'./configure --disable-gifview --disable-gifdiff',
|
||||
'--prefix="' + bin.dest() + '" --bindir="' + bin.dest() + '"'
|
||||
`--prefix="${bin.dest()}" --bindir="${bin.dest()}"`
|
||||
].join(' ');
|
||||
|
||||
var builder = new BinBuild()
|
||||
.src('https://github.com/kohler/gifsicle/archive/v1.88.tar.gz')
|
||||
.cmd('autoreconf -ivf')
|
||||
.cmd(cfg)
|
||||
.cmd('make install');
|
||||
try {
|
||||
await binBuild.file(path.resolve(__dirname, '../vendor/source/gifsicle-1.92.tar.gz'), [
|
||||
'autoreconf -ivf',
|
||||
config,
|
||||
'make install'
|
||||
]);
|
||||
|
||||
return builder.run(function (err) {
|
||||
if (err) {
|
||||
log.error(err.stack);
|
||||
return;
|
||||
}
|
||||
console.log('gifsicle built successfully');
|
||||
} catch (error) {
|
||||
console.error(error.stack);
|
||||
|
||||
log.success('gifsicle built successfully');
|
||||
});
|
||||
// eslint-disable-next-line unicorn/no-process-exit
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
log.success('gifsicle pre-build test passed successfully');
|
||||
});
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user