1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-07 17:35:42 +02:00
tldr/pages.zh/common/deno.md
2025-07-14 10:32:02 -07:00

24 lines
530 B
Markdown

# deno
> 一个安全的 JavaScript 和 TypeScript 运行时。
> 更多信息:<https://docs.deno.com/runtime/reference/cli>.
- 运行 JavaScript 或 TypeScript 文件:
`deno run {{路径/到/文件.ts}}`
- 启动 REPL(交互式 shell):
`deno`
- 运行文件并启用网络访问:
`deno run --allow-net {{路径/到/文件.ts}}`
- 从 URL 运行文件:
`deno run {{https://deno.land/std/examples/welcome.ts}}`
- 从 URL 安装可执行脚本:
`deno install {{https://deno.land/std/examples/colors.ts}}`