قم بتهيئة تطبيق Astro جديد باستخدام bun create astro. حزمة create-astro تكتشف عند استخدام bunx وتقوم بتثبيت التبعيات تلقائيًا باستخدام bun.
sh
bun create astrotxt
╭─────╮ Houston:
│ ◠ ◡ ◠ We're glad to have you on board.
╰─────╯
astro v3.1.4 Launch sequence initiated.
dir Where should we create your new project?
./fumbling-field
tmpl How would you like to start your new project?
Use blog template
✔ Template copied
deps Install dependencies?
Yes
✔ Dependencies installed
ts Do you plan to write TypeScript?
Yes
use How strict should TypeScript be?
Strict
✔ TypeScript customized
git Initialize a new git repository?
Yes
✔ Git initialized
next Liftoff confirmed. Explore your project!
Enter your project directory using cd ./fumbling-field
Run `bun run dev` to start the dev server. CTRL+C to stop.
Add frameworks like react or tailwind using astro add.
Stuck? Join us at https://astro.build/chat
╭─────╮ Houston:
│ ◠ ◡ ◠ Good luck out there, astronaut! 🚀
╰─────╯ابدأ خادم التطوير باستخدام bunx.
بشكل افتراضي، سيشغل Bun خادم التطوير باستخدام Node.js. لاستخدام وقت تشغيل Bun بدلاً من ذلك، استخدم العلم --bun.
sh
bunx --bun astro devtxt
🚀 astro v3.1.4 started in 200ms
┃ Local http://localhost:4321/
┃ Network use --host to exposeافتح http://localhost:4321 في متصفحك لرؤية النتيجة. سيقوم Astro بإعادة تحميل تطبيقك تلقائيًا أثناء تحرير ملفات المصدر.
راجع وثائق Astro للحصول على الوثائق الكاملة.