切换默认源
npm config set registry https://registry.npmjs.org
切换淘宝源
#临时使用
npm --registry https://registry.npm.taobao.org
#全局使用
npm config set registry https://registry.npm.taobao.org
将账号会被添加到npm本地的配置中
npm adduser
npm会把认证信息存储在~/.npmrc中,并且可以通过以下命令查看npm当前使用的用户:
npm whoami
npm login
npm init
npm publish
npm unpublish --force //强制删除
npm unpublish ahzotest@1.0.0 //指定版本号
npm deprecate //某些情况