Files
2023-08-01 13:49:46 +02:00

14 lines
484 B
JavaScript

'use strict';
const path = require('path');
const BinWrapper = require('bin-wrapper');
const pkg = require('../package.json');
const url = `https://raw.githubusercontent.com/imagemin/guetzli-bin/v${pkg.version}/vendor/`;
module.exports = new BinWrapper()
.src(`${url}macos/guetzli`, 'darwin')
.src(`${url}linux/guetzli`, 'linux')
.src(`${url}win/guetzli.exe`, 'win32')
.dest(path.resolve(__dirname, '../vendor'))
.use(process.platform === 'win32' ? 'guetzli.exe' : 'guetzli');