1 | ;
|
2 | const path = require('path');
|
3 | const BinWrapper = require('bin-wrapper');
|
4 | const pkg = require('../package.json');
|
5 |
|
6 | const url = `https://raw.githubusercontent.com/imagemin/guetzli-bin/v${pkg.version}/vendor/`;
|
7 |
|
8 | module.exports = new BinWrapper()
|
9 | .src(`${url}macos/guetzli`, 'darwin')
|
10 | .src(`${url}linux/guetzli`, 'linux')
|
11 | .src(`${url}win/guetzli.exe`, 'win32')
|
12 | .dest(path.resolve(__dirname, '../vendor'))
|
13 | .use(process.platform === 'win32' ? 'guetzli.exe' : 'guetzli');
|