Skip to content

Commit

Permalink
Update: Allow also no CSS Framework
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnitto committed May 7, 2024
1 parent b47c3b4 commit 47f2fb4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Classes/Composer.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,16 @@ public static function postPackageUpdateAndInstall(?PackageEvent $event = null):
$keepExistingFiles = $console->askConfirmation('<question> Do you want to keep existing files? </question> [<options=bold>Y</>/n] ', true);
$console->outputLine('');

$packageManager = $console->select('<question> Which package manager you want to use? </question>', ['pnpm', 'npm', 'yarn']);
$packageManager = $console->select('<question> Which package manager you want to use? </question> [<options=bold>pnpm</>]', ['pnpm', 'npm', 'yarn'], 'pnpm');
$console->outputLine('');

$cssFrameworkArray = [
'none' => 'None',
'bootstrap' => 'Bootstrap (installs also Sass)',
'tailwindcss' => 'Tailwind CSS',
'bulma' => 'Bulma (installs also Sass)',
];
$cssFramework = $console->select('<question> Do you want to use a CSS framework? </question>', $cssFrameworkArray, null, true);
$cssFramework = $console->select('<question> Do you want to use a CSS framework? </question> [<options=bold>None</>]', $cssFrameworkArray, 'none', true);
$console->outputLine('');

$sass = in_array('bootstrap', $cssFramework) || in_array('bulma', $cssFramework);
Expand Down Expand Up @@ -93,7 +94,7 @@ protected static function getCurrentWorkingDirectory(): string
*/
protected static function installPackage(string $packageManager, bool $typescript, bool $sass, array $cssFramework): void
{
$packages = $cssFramework;
$packages = in_array('none', $cssFramework) ? [] : $cssFramework;
if ($typescript) {
$packages[] = 'typescript-eslint';
}
Expand Down

0 comments on commit 47f2fb4

Please sign in to comment.