Detect Bun package manager in create-astro (#7944)
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
This commit is contained in:
parent
097a8e4e91
commit
dff0f0f8dd
2 changed files with 11 additions and 1 deletions
5
.changeset/brown-wolves-tan.md
Normal file
5
.changeset/brown-wolves-tan.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'create-astro': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Update 'dev' command for Bun users
|
|
@ -5,7 +5,12 @@ import { nextSteps, say } from '../messages.js';
|
||||||
|
|
||||||
export async function next(ctx: Pick<Context, 'cwd' | 'pkgManager' | 'skipHouston'>) {
|
export async function next(ctx: Pick<Context, 'cwd' | 'pkgManager' | 'skipHouston'>) {
|
||||||
let projectDir = path.relative(process.cwd(), ctx.cwd);
|
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 });
|
await nextSteps({ projectDir, devCmd });
|
||||||
|
|
||||||
if (!ctx.skipHouston) {
|
if (!ctx.skipHouston) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue