npm和cnpm的各种源以及切换管理工具nrm

 2019-9-15      前端 

npm

npm命令

cnpm

通过改变地址来使用淘宝镜像

nrm

$ nrm ls
npm -------- https://registry.npmjs.org/  
yarn ------- https://registry.yarnpkg.com/  
cnpm ------- http://r.cnpmjs.org/  
taobao ----- https://registry.npm.taobao.org/  
nj --------- https://registry.nodejitsu.com/  
npmMirror -- https://skimdb.npmjs.com/registry/  
edunpm ----- http://registry.enpmjs.org/  
  

参数说明

为什么要保存在package.json 因为node_module包实在是太大了。用一个配置文件保存,只打包安装对应配置文件的插件,按需导入。

转载:https://www.jianshu.com/p/115594f64b41

前端