Front-end learning record 006_npm command line, nrm warehouse management and cnpm (windows version)

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 # 可以通过 --registry=https://registry.npm.taobao.org 配置下载镜像

2.2 View available warehouse addresses

nrm ls

2.3 add or del warehouse

#添加仓库地址
nrm add 仓库名 地址 # 例如:nrm add myrepos http://www.baidu.com
#删除仓库地址
nrm del 仓库名   # 例如:nrm del myrepos

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开头就可以了

Guess you like

Origin blog.csdn.net/Duckdan/article/details/114727760