Initial commit

This commit is contained in:
Developer
2025-04-21 16:03:20 +02:00
commit 2832896157
22874 changed files with 3092801 additions and 0 deletions

View File

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

View File

@@ -0,0 +1,34 @@
'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('gifsicle pre-build test failed');
log.info('compiling from source');
var cfg = [
'./configure --disable-gifview --disable-gifdiff',
'--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');
return builder.run(function (err) {
if (err) {
log.error(err.stack);
return;
}
log.success('gifsicle built successfully');
});
}
log.success('gifsicle pre-build test passed successfully');
});