npm set taobao source

时间:2020-04-01 20:32:24   收藏:0   阅读:69

npm 设置淘宝镜像源

# 安装时临时指定代理
npm --registry=https://registry.npm.taobao.org install

# 全局配置
npm config set registry https://registry.npm.taobao.org

# 删除
npm config delete registry
# or
npm config edit
# 找到:registry=https://registry.npm.taobao.org/ 删除

# 查看镜像地址
npm get registry

 

使用 cnpm

支持 gzip 压缩,可代替默认的 npm

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

# 安装模块
cnpm install [name]

# 同步模块,直接通过 sync 命令马上同步一个模块, 只有 cnpm 命令行才有此功能:
cnpm sync connect
# or 通过 web 方式
open https://npm.taobao.org/sync/connect

 


https://developer.aliyun.com/mirror/NPM

原文:https://www.cnblogs.com/jhxxb/p/12615087.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!