download
download copied to clipboard
feat: support URL rewriting
Allow rewriting URLs before download starts.
This is useful for cases with network problems. We can easily change the prefixes of the URLs to our mirrors by creating a ~/.downloadrc like this:
{
"rewrite": {
"https://raw.githubusercontent.com/imagemin/cwebp-bin/": "https://npm.taobao.org/mirrors/cwebp-bin/",
"https://raw.githubusercontent.com/imagemin/mozjpeg-bin/": "https://npm.taobao.org/mirrors/mozjpeg-bin/",
"https://raw.githubusercontent.com/imagemin/pngquant-bin/": "https://npm.taobao.org/mirrors/pngquant-bin/"
}
}