使用交互式 bun init
命令构建一个空的 Bun 项目。
bun init
bun init helps you get started with a minimal project and tries to
guess sensible defaults. Press ^C anytime to quit.
package name (quickstart):
entry point (index.ts):
Done! A package.json file was saved in the current directory.
+ index.ts
+ .gitignore
+ tsconfig.json (for editor auto-complete)
+ README.md
To get started, run:
bun run index.ts
按 enter
键接受每个提示的默认答案,或传递 -y
标志以自动接受默认值。
bun init
的工作原理