Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/NewCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ protected function configure()
->addOption('organization', null, InputOption::VALUE_REQUIRED, 'The GitHub organization to create the new repository for')
->addOption('breeze', null, InputOption::VALUE_NONE, 'Installs the Laravel Breeze scaffolding')
->addOption('dark', null, InputOption::VALUE_NONE, 'Indicate whether Breeze or Jetstream should be scaffolded with dark mode support')
->addOption('typescript', null, InputOption::VALUE_NONE, 'Indicate whether Breeze should be scaffolded with TypeScript support (Experimental)')
->addOption('ssr', null, InputOption::VALUE_NONE, 'Indicate whether Breeze should be scaffolded with Inertia SSR support')
->addOption('jet', null, InputOption::VALUE_NONE, 'Installs the Laravel Jetstream scaffolding')
->addOption('stack', null, InputOption::VALUE_OPTIONAL, 'The Breeze / Jetstream stack that should be installed')
Expand Down Expand Up @@ -232,6 +233,7 @@ protected function installBreeze(string $directory, InputInterface $input, Outpu
trim(sprintf(
'"'.PHP_BINARY.'" artisan breeze:install %s %s %s %s',
$input->getOption('stack'),
$input->getOption('typescript') ? '--typescript' : '',
$input->getOption('pest') ? '--pest' : '',
$input->getOption('dark') ? '--dark' : '',
$input->getOption('ssr') ? '--ssr' : '',
Expand Down Expand Up @@ -297,10 +299,12 @@ protected function promptForBreezeOptions(InputInterface $input)
options: [
'dark' => 'Dark mode',
'ssr' => 'Inertia SSR',
'typescript' => 'TypeScript (experimental)',
],
default: array_filter([
$input->getOption('dark') ? 'dark' : null,
$input->getOption('ssr') ? 'ssr' : null,
$input->getOption('typescript') ? 'typescript' : null,
]),
))->each(fn ($option) => $input->setOption($option, true));
} elseif ($input->getOption('stack') === 'blade' && ! $input->getOption('dark')) {
Expand Down