NPM 包管理命令
npm install
安装依赖包
npm install [包名] [选项]
npm update
更新依赖包
npm update [包名] [选项]
npm list
列出已安装的包
npm list [选项] [包名]
npm uninstall
卸载包
npm uninstall [选项] <包>[@版本]
npm outdated
检查过期依赖
npm outdated [选项]
npm ci
干净安装(CI 用)
npm ci [选项]
npm run
运行脚本
npm run <脚本名>
npm test
运行测试
npm test [选项]
npm init
初始化项目
npm init [选项]
npm publish
发布包
npm publish [选项]
npm view
查看包信息
npm view [<包>] [<字段>]
npm search
搜索包
npm search [选项] <关键词>
npm audit
安全审计
npm audit [子命令] [选项]
npm cache
管理 npm 缓存
npm cache <子命令> [选项]
npm config
管理 npm 配置
npm config <子命令> [选项]