使用cnpm(淘宝npm镜像)

推荐的镜像使用方法:

编辑文件 .npmrc 加入下面内容

registry = https://registry.npm.taobao.org

windows下的 .npmrc 文件位置:

//  Windows用户文件夹根目录底下的,以我的为例是:
C:\Users\Administrator  

安装时的命令依然使用:

// npm install yourname
npm install gulp

 

最终发现cnpm其实是这么用的

npm install -g cnpm --registry=http://r.cnpmjs.org
npm install yourname --registry=http://r.cnpmjs.org --disturl=http://dist.cnpmjs.org

 

 

参考:

https://cnodejs.org/topic/4f9904f9407edba21468f31e

posted @ 2015-06-19 15:15  GallenHu  阅读(2026)  评论(0编辑  收藏  举报