使用互動式 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
的運作方式