WishMeLz

生活其实很有趣

npm 设置与代理

查询当前镜像源

npm get registry

设置镜像源

npm config set registry https://registry.npmmirror.com/

electron镜像

npm config set ELECTRON_MIRROR "https://npmmirror.org/mirrors/electron/"

看和删除electron镜像

npm config get ELECTRON_MIRROR
npm config delete ELECTRON_MIRROR

查看当前代理

npm config get proxy
npm config get https-proxy

设置代理

npm config set proxy http://server:port
npm config set https-proxy http://server:port

删除代理

npm config set proxy null
npm config set https-proxy null