Skip to content

Commit 6f3cca8

Browse files
committed
update command
1 parent 61db11d commit 6f3cca8

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

bin/laravel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if (file_exists(__DIR__.'/../../../autoload.php')) {
77
require __DIR__.'/../vendor/autoload.php';
88
}
99

10-
$app = new Symfony\Component\Console\Application('Laravel Installer', '5.12.2');
10+
$app = new Symfony\Component\Console\Application('Laravel Installer', '5.13.0');
1111
$app->add(new Laravel\Installer\Console\NewCommand);
1212

1313
$app->run();

src/NewCommand.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ protected function configure()
5151
->addOption('react', null, InputOption::VALUE_NONE, 'Install the React Starter Kit')
5252
->addOption('vue', null, InputOption::VALUE_NONE, 'Install the Vue Starter Kit')
5353
->addOption('livewire', null, InputOption::VALUE_NONE, 'Install the Livewire Starter Kit')
54+
->addOption('livewire-class-components', null, InputOption::VALUE_NONE, 'Generate stand-alone Livewire class components')
5455
->addOption('workos', null, InputOption::VALUE_NONE, 'Use WorkOS for authentication')
5556
->addOption('pest', null, InputOption::VALUE_NONE, 'Install the Pest testing framework')
5657
->addOption('phpunit', null, InputOption::VALUE_NONE, 'Install the PHPUnit testing framework')
@@ -138,6 +139,13 @@ protected function interact(InputInterface $input, OutputInterface $output)
138139
default => null,
139140
};
140141
}
142+
143+
if ($input->getOption('livewire') && ! $input->getOption('workos')) {
144+
$input->setOption('livewire-class-components', ! confirm(
145+
label: 'Would you like to use Laravel Volt?',
146+
default: true,
147+
));
148+
}
141149
}
142150

143151
if ($this->usingStarterKit($input)) {
@@ -228,6 +236,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int
228236
if ($stackSlug) {
229237
$createProjectCommand = $composer." create-project laravel/$stackSlug-starter-kit \"$directory\" --stability=dev";
230238

239+
if ($input->getOption('livewire-class-components')) {
240+
$createProjectCommand = str_replace(" laravel/{$stackSlug}-starter-kit ", " laravel/{$stackSlug}-starter-kit:dev-components ", $createProjectCommand);
241+
}
242+
231243
if ($input->getOption('workos')) {
232244
$createProjectCommand = str_replace(" laravel/{$stackSlug}-starter-kit ", " laravel/{$stackSlug}-starter-kit:dev-workos ", $createProjectCommand);
233245
}

0 commit comments

Comments
 (0)