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