UNPKG

484 BJavaScriptView Raw
1'use strict';
2const path = require('path');
3const BinWrapper = require('bin-wrapper');
4const pkg = require('../package.json');
5
6const url = `https://raw.githubusercontent.com/imagemin/guetzli-bin/v${pkg.version}/vendor/`;
7
8module.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');