From 7bfae73d37bea92bfe06090b767b7db73520f5b9 Mon Sep 17 00:00:00 2001 From: Claudio Ludovico <921500+ludo237@users.noreply.github.com> Date: Fri, 3 Oct 2025 16:46:36 +0200 Subject: [PATCH] feat: bun package install/build --- src/NewCommand.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/NewCommand.php b/src/NewCommand.php index 04dea0f..5b438ea 100644 --- a/src/NewCommand.php +++ b/src/NewCommand.php @@ -506,23 +506,29 @@ protected function execute(InputInterface $input, OutputInterface $output): int } $packageInstall = 'npm install'; + $packageBuild = 'npm run build'; if (file_exists($directory.'/pnpm-lock.yaml')) { $packageInstall = 'pnpm install'; + $packageBuild = 'pnpm run build'; } elseif (file_exists($directory.'/yarn.lock')) { $packageInstall = 'yarn install'; + $packageBuild = 'yarn run build'; + } elseif (file_exists($directory.'/bun.lock')) { + $packageInstall = 'bun install'; + $packageBuild = 'bun run build'; } $runNpm = $input->getOption('npm'); if (! $input->getOption('npm') && $input->isInteractive()) { $runNpm = confirm( - label: 'Would you like to run '.$packageInstall.' and npm run build?' + label: 'Would you like to run '.$packageInstall.' and '.$packageBuild.'?' ); } if ($runNpm) { - $this->runCommands([$packageInstall, 'npm run build'], $input, $output, workingPath: $directory); + $this->runCommands([$packageInstall, $packageBuild], $input, $output, workingPath: $directory); } $output->writeln(" INFO Application ready in [{$name}]. You can start your local development using:".PHP_EOL);