One, npm related commands
1.1 View npm global configuration information
npm config get
1.2 View the warehouse address currently used by npm
npm config get registry
1.3 Specify the address to be used for this download dependency
npm install --registry=https://registry.npm.taobao.org/
1.4 Configure the global npm repository
npm config set registry http://registry.npm.taobao.org/
1.5 Configuration file content
Profiles can
be obtained to view global configuration
Two, use nrm to manage the npm warehouse address
2.1 Install nrm
npm install -g nrm
2.2 View available warehouse addresses
nrm ls
2.3 add or del warehouse
nrm add 仓库名 地址
nrm del 仓库名
2.4 Switch warehouse address
nrm use 仓库名
Three, use cnpm instead of npm
3.1 Installation
npm install -g cnpm --registry=https://registry.npm.taobao.org
3.2 cnpm command
将npm开头的命令行,换成cnpm开头就可以了