Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.x] Give users the option to keep js/css when installing the API stack #450

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions src/Console/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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}';

/**
Expand Down Expand Up @@ -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(
Expand Down
4 changes: 3 additions & 1 deletion src/Console/InstallsApiStack.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
}
Expand Down
Loading