加载笔记内容...
加载笔记内容...
1# ==========================================================
2# NPM
3# ==========================================================
4
5npm set registry https://registry.npmmirror.com # 注册模块镜像
6npm set disturl https://npmmirror.com/mirrors/node # node-gyp 编译依赖的 node 源码镜像
7
8## 以下选择添加
9npm set sass_binary_site https://registry.npmmirror.com/mirrors/node-sass # node-sass 二进制包镜像
10npm set electron_mirror https://registry.npmmirror.com/mirrors/electron/ # electron 二进制包镜像
11npm set puppeteer_download_host https://registry.npmmirror.com/mirrors # puppeteer 二进制包镜像
12npm set chromedriver_cdnurl https://registry.npmmirror.com/mirrors/chromedriver # chromedriver 二进制包镜像
13npm set operadriver_cdnurl https://registry.npmmirror.com/mirrors/operadriver # operadriver 二进制包镜像
14npm set phantomjs_cdnurl https://registry.npmmirror.com/mirrors/phantomjs # phantomjs 二进制包镜像
15npm set selenium_cdnurl https://registry.npmmirror.com/mirrors/selenium # selenium 二进制包镜像
16npm set node_inspector_cdnurl https://registry.npmmirror.com/mirrors/node-inspector # node-inspector 二进制包镜像
17npm set sentrycli_cdnurl https://npmmirror.com/mirrors/sentry-cli/ # sentry-cli
18
19npm cache clean --force # 清空缓存
20
.npmrc
设置1registry=https://registry.npmmirror.com
2disturl=https://npmmirror.com/mirrors/node
3sass_binary_site=https://registry.npmmirror.com/mirrors/node-sass
4electron_mirror=https://registry.npmmirror.com/mirrors/electron/
5puppeteer_download_host=https://registry.npmmirror.com/mirrors
6chromedriver_cdnurl=https://registry.npmmirror.com/mirrors/chromedriver
7operadriver_cdnurl=https://registry.npmmirror.com/mirrors/operadriver
8phantomjs_cdnurl=https://registry.npmmirror.com/mirrors/phantomjs
9selenium_cdnurl=https://registry.npmmirror.com/mirrors/selenium
10node_inspector_cdnurl=https://registry.npmmirror.com/mirrors/node-inspector
11sentrycli_cdnurl=https://npmmirror.com/mirrors/sentry-cli/
12