diff --git a/src/Console/InstallCommand.php b/src/Console/InstallCommand.php index 17be8c5f..431ef200 100644 --- a/src/Console/InstallCommand.php +++ b/src/Console/InstallCommand.php @@ -35,6 +35,7 @@ class InstallCommand extends Command implements PromptsForMissingInput {--ssr : Indicates if Inertia SSR support should be installed} {--typescript : Indicates if TypeScript is preferred for the Inertia stack} {--eslint : Indicates if ESLint with Prettier should be installed} + {--remove-scaffolding : Indicates if default scaffolding should be removed with the API stack} {--composer=global : Absolute path to the Composer binary which should be used to install packages}'; /** @@ -413,6 +414,10 @@ protected function afterPromptingForMissingArguments(InputInterface $input, Outp label: 'Would you like dark mode support?', default: false )); + } elseif ($stack === 'api') { + $input->setOption('remove-scaffolding', confirm( + label: 'Would you like remove any unnecessary frontend (css, js, etc) scaffolding?', + )); } $input->setOption('pest', select( diff --git a/src/Console/InstallsApiStack.php b/src/Console/InstallsApiStack.php index f88f73cf..2a43bb6c 100644 --- a/src/Console/InstallsApiStack.php +++ b/src/Console/InstallsApiStack.php @@ -65,7 +65,9 @@ protected function installApiStack() $files->delete(base_path('tests/Feature/Auth/PasswordConfirmationTest.php')); // Cleaning... - $this->removeScaffoldingUnnecessaryForApis(); + if ($this->option('remove-scaffolding')) { + $this->removeScaffoldingUnnecessaryForApis(); + } $this->components->info('Breeze scaffolding installed successfully.'); }