Skip to content

Commit

Permalink
feat: adding bun
Browse files Browse the repository at this point in the history
  • Loading branch information
roberto-butti committed Sep 12, 2023
1 parent c55c486 commit 582c741
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/commands/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default class CreateStoryblokAppCommand extends Command {
}),
packagemanager: Flags.string({
char: 'p',
description: 'Package manager to use (yarn or npm)',
description: 'Package manager to use (yarn or npm or bun)',
}),
};

Expand Down Expand Up @@ -184,8 +184,19 @@ export default class CreateStoryblokAppCommand extends Command {
log('')

// package manager
const mangerInstall = packagemanager === 'yarn' ? 'yarn' : 'npm install'
const mangerRun = packagemanager === 'yarn' ? 'yarn' : 'npm run'
let mangerInstall = 'npm install'
let mangerRun = 'npm run'
switch (packagemanager) {
case 'yarn':
mangerInstall = 'yarn'
mangerRun = 'yarn run'
break
case 'bun':
mangerInstall = 'bun install'
mangerRun = 'bun run'
break
}

const executeMkcert = frameworkDetails.usingMkcert ? ' && mkcert localhost ' : ''
log(
chalkSb('1. Start the server: '),
Expand Down
1 change: 1 addition & 0 deletions src/lib/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export default [
choices: [
{name: 'yarn', value: 'yarn'},
{name: 'npm', value: 'npm'},
{name: 'bun', value: 'bun'},
],
},
{
Expand Down

0 comments on commit 582c741

Please sign in to comment.