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 485B

12345678910111213
  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.github.com/imagemin/zopflipng-bin/v${pkg.version}/vendor/`;
  6. module.exports = new BinWrapper()
  7. .src(`${url}osx/zopflipng`, 'darwin')
  8. .src(`${url}linux/zopflipng`, 'linux')
  9. .src(`${url}win32/zopflipng.exe`, 'win32')
  10. .dest(path.resolve(__dirname, '../vendor'))
  11. .use(process.platform === 'win32' ? 'zopflipng.exe' : 'zopflipng');