Skip to content

Commit b9b884d

Browse files
committed
feat: show default option if app starter isn't selected
1 parent 36b7d7c commit b9b884d

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "leafs/cli",
33
"description": "A simple command line tool for installing and interacting with your leaf apps",
44
"homepage": "https://cli.leafphp.dev",
5-
"version": "v4.1",
5+
"version": "v4.1.1",
66
"keywords": [
77
"leaf",
88
"php",

src/CreateCommand.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,14 @@ protected function handle(): int
180180
'message' => 'Select a view engine',
181181
'default' => 0,
182182
'choices' => [
183-
['title' => 'Blade + Alpine', 'value' => 'tailwind'],
183+
[
184+
'title' => 'Default',
185+
'value' => 'default',
186+
'disabled' => function ($answers) {
187+
return $answers['auth'] ?? false;
188+
}
189+
],
190+
['title' => 'Blade + Tailwind', 'value' => 'tailwind'],
184191
['title' => 'React JS', 'value' => 'react'],
185192
['title' => 'Vue JS', 'value' => 'vue'],
186193
['title' => 'Svelte', 'value' => 'svelte'],
@@ -202,7 +209,7 @@ protected function handle(): int
202209

203210
$extraCommands = ["cd \"$directory\""];
204211

205-
if (isset($extraOptions['view'])) {
212+
if (isset($extraOptions['view']) && $extraOptions['view'] !== 'default') {
206213
$extraCommands[] = 'php leaf view:install --' . $extraOptions['view'];
207214
}
208215

0 commit comments

Comments
 (0)