标签:管理工具 manage conf get 通过 reg 镜像 class npm
npm全称Node Package Manager,是node.js的模块依赖管理工具。由于npm的源在国外,所以国内用户使用起来各种不方便。下面整理出了一部分国内优秀的npm镜像资源,国内用户可以选择使用。
有很多方法来配置npm的registry地址,下面根据不同情境列出几种比较常用的方法。以淘宝npm镜像举例:
npm --registry https://registry.npm.taobao.org install express
npm config set registry https://registry.npm.taobao.org
// 配置后可通过下面方式来验证是否成功
npm config get registry
// 或
npm info express
cnpm使用npm install -g cnpm --registry=https://registry.npm.taobao.org
// 使用
cnpm install express
转自:http://riny.net/2014/cnpm/标签:管理工具 manage conf get 通过 reg 镜像 class npm
原文地址:http://www.cnblogs.com/laojun/p/6066012.html