You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.js 719B

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