From c96c57fa192f4264504e2670aeecd2a37a14785c Mon Sep 17 00:00:00 2001 From: roble Date: Wed, 22 Jul 2026 19:50:50 +0100 Subject: [PATCH] feat: Enhance installation commands with no-hint option and update next steps message --- src/Console/Commands/InstallCommand.php | 2 +- src/Console/Commands/NewCommand.php | 2 ++ src/Console/Commands/StackCommand.php | 8 ++++++-- src/Environments/NativeEnvironment.php | 1 + 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Console/Commands/InstallCommand.php b/src/Console/Commands/InstallCommand.php index 1e53959..033e0f8 100644 --- a/src/Console/Commands/InstallCommand.php +++ b/src/Console/Commands/InstallCommand.php @@ -146,7 +146,7 @@ public function runStack(): void if ($this->selectedStack) { $isDev = $this->option('dev') ? ['--dev' => true] : []; $this->call('stack', array_merge( - ['stack' => $this->selectedStack, '--path' => $this->targetPath()], + ['stack' => $this->selectedStack, '--path' => $this->targetPath(), '--no-hint' => true], $isDev, )); } diff --git a/src/Console/Commands/NewCommand.php b/src/Console/Commands/NewCommand.php index 21fd0b1..6b14037 100644 --- a/src/Console/Commands/NewCommand.php +++ b/src/Console/Commands/NewCommand.php @@ -89,6 +89,8 @@ public function handle(): int return self::FAILURE; } + $this->line(' Setup continues below - see the final summary for the real next steps.'); + $result = $this->call('install', $this->installArguments($name, $driver, $stack, $ssl, $modules)); if ($result === self::SUCCESS) { diff --git a/src/Console/Commands/StackCommand.php b/src/Console/Commands/StackCommand.php index 3678ae7..cc6621b 100644 --- a/src/Console/Commands/StackCommand.php +++ b/src/Console/Commands/StackCommand.php @@ -16,7 +16,8 @@ class StackCommand extends Command {--dev : Contributor dev mode — copy config files only, keep both source dirs} {--reset : Reset to clean state with no framework selected} {--no-skip-worktree : Do not mark generated files as skip-worktree in git} - {--no-install : Skip npm install after selecting the framework (dev mode)}'; + {--no-install : Skip npm install after selecting the framework (dev mode)} + {--no-hint : Suppress the npm install reminder (used when invoked from the install flow)}'; protected $description = 'Select the frontend framework stack (vue or react) for this Saucebase installation'; @@ -106,7 +107,10 @@ private function runInstallMode(string $framework): int $this->files->deleteDirectory($this->basePath.'/stubs/saucebase/stack'); $this->deployModuleFiles($framework); $this->flattenRecipeStubs($framework); - $this->info("Framework set to {$framework}. Run: npm install to install dependencies."); + + if (! $this->option('no-hint')) { + $this->info("Framework set to {$framework}. Run: npm install to install dependencies."); + } return self::SUCCESS; } diff --git a/src/Environments/NativeEnvironment.php b/src/Environments/NativeEnvironment.php index 42e69cd..6dcb3ab 100644 --- a/src/Environments/NativeEnvironment.php +++ b/src/Environments/NativeEnvironment.php @@ -35,6 +35,7 @@ protected function boot(InstallCommand $command): int protected function nextSteps(InstallCommand $command): array { return [ + 'Install frontend dependencies: npm install', 'Start the dev server: composer dev', 'Open your app: '.($this->readEnvValue($command, 'APP_URL') ?? 'http://localhost').'', ];