npm 相关

npm,相关的介绍和命令都可以查看文档,这里不赘述了;

npm 除了上面的文档,经常还会有人提到 淘宝 NPM 镜像,用法大概有这么几种:

1.临时使用
npm --registry https://registry.npm.taobao.org install express
2.持久使用
npm config set registry https://registry.npm.taobao.org
相当于修改 ~/.npmrc 文件,写入
registry = https://registry.npm.taobao.org
上面的修改,可通过下面代码验证是否成功:
npm info express
参考:
http://blog.csdn.net/quuqu/article/details/64121812
https://cnodejs.org/topic/4f9904f9407edba21468f31e
原文地址:https://www.cnblogs.com/xianshenglu/p/8508481.html