欢迎您访问 最编程 本站为您分享编程语言代码,编程技术文章!
您现在的位置是: 首页

npm 切换源代码和 nrm 管理源代码

最编程 2024-03-14 10:38:20
...

切换npm源为淘宝源

npm config set registry https://registry.npm.taobao.org

查看npm源

npm config get registry

cnpm的使用

安装cnpm

cnpm可以替代npm使用

npm install -g cnpm --registry=https://registry.npm.taobao.org

nrm

安装

npm install -g nrm

显示使用的源地址

nrm ls

切换源

使用npm下载包的时候,使用cnpm的镜像源下载东西

nrm use cnpm

了解每个源下载的速度

nrm test