| Leo Repp | 58b9f11 | 2021-11-22 11:57:47 +0100 | [diff] [blame^] | 1 | 'use strict'; |
| 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/gifsicle-bin/v${pkg.version}/vendor/`; |
| 7 | |
| 8 | module.exports = new BinWrapper() |
| 9 | .src(`${url}macos/gifsicle`, 'darwin') |
| 10 | .src(`${url}linux/x86/gifsicle`, 'linux', 'x86') |
| 11 | .src(`${url}linux/x64/gifsicle`, 'linux', 'x64') |
| 12 | .src(`${url}freebsd/x86/gifsicle`, 'freebsd', 'x86') |
| 13 | .src(`${url}freebsd/x64/gifsicle`, 'freebsd', 'x64') |
| 14 | .src(`${url}win/x86/gifsicle.exe`, 'win32', 'x86') |
| 15 | .src(`${url}win/x64/gifsicle.exe`, 'win32', 'x64') |
| 16 | .dest(path.join(__dirname, '../vendor')) |
| 17 | .use(process.platform === 'win32' ? 'gifsicle.exe' : 'gifsicle'); |