WIP - add extractor, generate snippet_data

This commit is contained in:
Stefan Fejes
2019-08-20 15:52:05 +02:00
parent 88084d3d30
commit cc8f1d8a7a
37396 changed files with 4588842 additions and 133 deletions

15
node_modules/cwebp-bin/lib/index.js generated vendored Normal file
View File

@ -0,0 +1,15 @@
'use strict';
const path = require('path');
const BinWrapper = require('bin-wrapper');
const pkg = require('../package.json');
const url = `https://raw.githubusercontent.com/imagemin/cwebp-bin/v${pkg.version}/vendor/`;
module.exports = new BinWrapper()
.src(`${url}osx/cwebp`, 'darwin')
.src(`${url}linux/x86/cwebp`, 'linux', 'x86')
.src(`${url}linux/x64/cwebp`, 'linux', 'x64')
.src(`${url}win/x86/cwebp.exe`, 'win32', 'x86')
.src(`${url}win/x64/cwebp.exe`, 'win32', 'x64')
.dest(path.join(__dirname, '../vendor'))
.use(process.platform === 'win32' ? 'cwebp.exe' : 'cwebp');

21
node_modules/cwebp-bin/lib/install.js generated vendored Normal file
View File

@ -0,0 +1,21 @@
'use strict';
const binBuild = require('bin-build');
const log = require('logalot');
const bin = require('.');
bin.run(['-version']).then(() => {
log.success('cwebp pre-build test passed successfully');
}).catch(error => {
log.warn(error.message);
log.warn('cwebp pre-build test failed');
log.info('compiling from source');
binBuild.url('http://downloads.webmproject.org/releases/webp/libwebp-1.0.2.tar.gz', [
`./configure --disable-shared --prefix="${bin.dest()}" --bindir="${bin.dest()}"`,
'make && make install'
]).then(() => {
log.success('cwebp built successfully');
}).catch(error => {
log.error(error.stack);
});
});