Skip to content

Commit

Permalink
Detect Bun package manager in create-astro (#7944)
Browse files Browse the repository at this point in the history
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
  • Loading branch information
colinhacks and natemoo-re authored Aug 17, 2023
1 parent 097a8e4 commit dff0f0f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/brown-wolves-tan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'create-astro': patch
---

Update 'dev' command for Bun users
7 changes: 6 additions & 1 deletion packages/create-astro/src/actions/next-steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ import { nextSteps, say } from '../messages.js';

export async function next(ctx: Pick<Context, 'cwd' | 'pkgManager' | 'skipHouston'>) {
let projectDir = path.relative(process.cwd(), ctx.cwd);
const devCmd = ctx.pkgManager === 'npm' ? 'npm run dev' : `${ctx.pkgManager} dev`;
const devCmd =
ctx.pkgManager === 'npm'
? 'npm run dev'
: ctx.pkgManager === 'bun'
? 'bun run dev'
: `${ctx.pkgManager} dev`;
await nextSteps({ projectDir, devCmd });

if (!ctx.skipHouston) {
Expand Down

0 comments on commit dff0f0f

Please sign in to comment.