bun: add Chinese translation (#11359)
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
This commit is contained in:

committed by
K.B.Dharun Krishna

parent
f1aa0a8fe5
commit
9d65ff511a
37
pages.zh/common/bun.md
Normal file
37
pages.zh/common/bun.md
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
# bun
|
||||||
|
|
||||||
|
> JavaScript 运行时和工具箱。
|
||||||
|
> 包含打包工具、测试运行器和包管理器。
|
||||||
|
> 更多信息:<https://bun.sh>.
|
||||||
|
|
||||||
|
- 运行 JavaScript 文件或 `package.json` 脚本:
|
||||||
|
|
||||||
|
`bun run {{path/to/file|script_name}}`
|
||||||
|
|
||||||
|
- 运行单元测试:
|
||||||
|
|
||||||
|
`bun test`
|
||||||
|
|
||||||
|
- 下载并安装 `package.json` 中列为依赖项的包:
|
||||||
|
|
||||||
|
`bun install`
|
||||||
|
|
||||||
|
- 向 `package.json` 添加依赖:
|
||||||
|
|
||||||
|
`bun add {{模块名称}}`
|
||||||
|
|
||||||
|
- 从 `package.json` 删除依赖:
|
||||||
|
|
||||||
|
`bun remove {{模块名称}}`
|
||||||
|
|
||||||
|
- 在当前文件夹创建新的 Bun 项目:
|
||||||
|
|
||||||
|
`bun init`
|
||||||
|
|
||||||
|
- 启动 REPL(交互式 shell):
|
||||||
|
|
||||||
|
`bun repl`
|
||||||
|
|
||||||
|
- 升级 Bun 到最新版本:
|
||||||
|
|
||||||
|
`bun upgrade`
|
Reference in New Issue
Block a user