diff --git a/src/Console/Commands/InstallCommand.php b/src/Console/Commands/InstallCommand.php index 4287ec3..12f61d2 100644 --- a/src/Console/Commands/InstallCommand.php +++ b/src/Console/Commands/InstallCommand.php @@ -495,8 +495,12 @@ protected function displaySuccess(): void $this->newLine(); $this->line('Next steps:'); $this->line(' 1. Ensure APP_URL is set correctly in .env'); - $this->line(' 2. Run: npm install && composer dev'); - $this->line(' 3. Open your app in the browser'); + if ($this->option('driver') === 'docker') { + $this->line(' 2. Start the dev server: npm run dev'); + } else { + $this->line(' 2. Start the dev server: php artisan serve or composer dev'); + } + $this->line(' 3. Open your app in the browser: '.config('app.url').''); $this->newLine(); $this->line('Learn more: https://github.com/saucebase-dev/saucebase'); } diff --git a/src/Console/Commands/StackCommand.php b/src/Console/Commands/StackCommand.php index 0c48f24..1a6ec13 100644 --- a/src/Console/Commands/StackCommand.php +++ b/src/Console/Commands/StackCommand.php @@ -132,7 +132,7 @@ private function runDevMode(string $framework): int $this->skipGeneratedFiles($framework); $this->runNpmInstall(); - $this->info("Framework set to {$framework} (dev mode). Run: composer dev"); + $this->info("Framework set to {$framework} (dev mode)"); return self::SUCCESS; } diff --git a/src/Environments/DockerEnvironment.php b/src/Environments/DockerEnvironment.php index 7c67042..f038799 100644 --- a/src/Environments/DockerEnvironment.php +++ b/src/Environments/DockerEnvironment.php @@ -57,7 +57,6 @@ public function run(InstallCommand $command): int $this->runInstallInContainer($command); $this->reloadDocker($command); - $this->runNpmOnHost($command); return InstallCommand::SUCCESS; } @@ -154,29 +153,6 @@ protected function reloadDocker(InstallCommand $command): void $process->run(); } - protected function runNpmOnHost(InstallCommand $command): void - { - $command->info('Installing frontend dependencies...'); - $install = new Process(['npm', 'install'], base_path()); - $install->setTimeout(300); - $install->run(fn ($_type, $buffer) => $command->line(trim($buffer))); - - if (! $install->isSuccessful()) { - $command->warn('npm install failed. Run manually: npm install'); - - return; - } - - $command->info('Building frontend assets...'); - $build = new Process(['npm', 'run', 'build'], base_path()); - $build->setTimeout(300); - $build->run(fn ($_type, $buffer) => $command->line(trim($buffer))); - - if (! $build->isSuccessful()) { - $command->warn('npm run build failed. Run manually: npm run build'); - } - } - /** @return string[] */ public function buildContainerArgs(InstallCommand $command): array {