diff --git a/lib/index.js b/lib/index.js index b50b50e..5c35ff9 100644 --- a/lib/index.js +++ b/lib/index.js @@ -3,7 +3,11 @@ const path = require('path'); const BinWrapper = require('bin-wrapper'); const pkg = require('../package.json'); -const url = `https://raw.githubusercontent.com/imagemin/pngquant-bin/v${pkg.version}/vendor/`; +const site = process.env.PNGQUANT_BINARY_SITE || + process.env.npm_config_pngquant_binary_site || + 'https://raw.githubusercontent.com'; + +const url = `${site}/imagemin/pngquant-bin/v${pkg.version}/vendor/`; module.exports = new BinWrapper() .src(`${url}macos/pngquant`, 'darwin')