Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add environment variable to set bin download URL #50

Open
peixin opened this issue Oct 25, 2019 · 1 comment
Open

Please add environment variable to set bin download URL #50

peixin opened this issue Oct 25, 2019 · 1 comment

Comments

@peixin
Copy link

peixin commented Oct 25, 2019

like node-sass can set sass-binary-site to download bin library.

function getBinaryUrl() {
  var site = getArgument('--sass-binary-site') ||
             process.env.SASS_BINARY_SITE  ||
             process.env.npm_config_sass_binary_site ||
             (pkg.nodeSassConfig && pkg.nodeSassConfig.binarySite) ||
             'https://github.com/sass/node-sass/releases/download';

  return [site, 'v' + pkg.version, getBinaryName()].join('/');
}

For some reason in china download from github is very slow.

We usually install package from https://npm.taobao.org/mirrors

pngquant-bin: https://npm.taobao.org/mirrors/pngquant-bin/
mozjpeg-bin: https://npm.taobao.org/mirrors/mozjpeg-bin/
cwebp-bin: https://npm.taobao.org/mirrors/cwebp-bin/

@magicdawn
Copy link

jsdelivr works fine in China, so I forked this package, see https://github.com/imagemin-bin-jsdelivr/mozjpeg-bin
And, use mozjpeg-jsdelivr package name instead.

for temporary use only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants