NPM配置国内淘宝镜像

Posted by zhulinpinyu on March 14, 2016

淘宝NPM镜像

配置

临时使用

npm --registry https://registry.npm.taobao.org install [package name]

持久使用

//查看当前配置
npm config get registry
//=> https://registry.npmjs.org/

//配置淘宝镜像
npm config set registry https://registry.npm.taobao.org

//查看是否配置成功
npm config get registry
//=> https://registry.npm.taobao.org/

以后npm install将默认采用淘宝的镜像。将会大幅提高工作效率。👍

Thanks

http://riny.net/2014/cnpm/ http://taobao.com 👍