Bun

bun init

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

CLI 用法

$bun init <進入點>

旗標

說明

--help
列印此選單

預設值

-y,--yes
接受所有預設選項

範例