1 min readAug 17, 2018
Good tip Markus, I found a way it can be even easier — apparently electron uses electron-download, and honours environment var, so you can just set e.g.
set -x NPM_CONFIG_ELECTRON_MIRROR "https://npm.taobao.org/mirrors/electron/"
or
export NPM_CONFIG_ELECTRON_MIRROR="https://npm.taobao.org/mirrors/electron/"
then npm install [electron] will use that; no need to manually download electron-download. Thanks!