前提: 已有项目,已有npm账号
- 登录到npm
npm login
登录到特定仓库需要添加 --registry 参数
本地发布
yalc
- 安装环境
npm install yalc -g
- 发布依赖
yalc publish
- 添加本地依赖
yalc add local-repo
- 更新依赖
yalc update
- 清除依赖
yalc remove
# 全部移除
yalc remove --all
verdaccio
- 安装环境
npm install --global verdaccio
- 运行
verdaccio - 登录npm:
npm adduser --registry [<http://localhost:4873/>](<http://localhost:4873/>) - 打开本地 http://localhost:4873/
- 发布:
npm publish --registry [<http://localhost:4873/>](<http://localhost:4873/>)