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

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