bun-install
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese/bun:install
/bun:install
Install all dependencies from package.json using Bun.
使用Bun安装package.json中的所有依赖。
Context
上下文
Package file: `find . -maxdepth 1 -name "package.json" | head -1`
Lock file: `find . -maxdepth 1 -name "bun.lock*" -o -name "bun.lockb" | head -1`Package file: `find . -maxdepth 1 -name "package.json" | head -1`
Lock file: `find . -maxdepth 1 -name "bun.lock*" -o -name "bun.lockb" | head -1`Execution
执行步骤
- Check if package.json exists
- Run installation with appropriate flags:
Development (default):
bash
bun installCI/Reproducible builds:
bash
bun install --frozen-lockfileProduction deployment:
bash
bun install --production- Report installed package count and any warnings
- 检查package.json是否存在
- 使用合适的参数运行安装命令:
开发环境(默认):
bash
bun installCI/可复现构建:
bash
bun install --frozen-lockfile生产部署:
bash
bun install --production- 报告已安装的包数量及任何警告
Post-install
安装后操作
- Verify node_modules exists
- Check for peer dependency warnings
- Run if it exists (for husky/hooks)
bun run prepare
- 验证node_modules是否存在
- 检查peer dependency警告
- 如果存在命令则执行(用于husky/hooks)
bun run prepare