Skip to content
Merged
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
8 changes: 6 additions & 2 deletions src/Console/Commands/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,12 @@ protected function displaySuccess(): void
$this->newLine();
$this->line('Next steps:');
$this->line(' 1. Ensure <fg=yellow>APP_URL</> is set correctly in <fg=yellow>.env</>');
$this->line(' 2. Run: <fg=yellow>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: <fg=yellow>npm run dev</>');
} else {
$this->line(' 2. Start the dev server: <fg=yellow>php artisan serve or composer dev</>');
}
$this->line(' 3. Open your app in the browser: <fg=yellow>'.config('app.url').'</>');
$this->newLine();
$this->line('Learn more: <fg=cyan>https://github.com/saucebase-dev/saucebase</>');
}
Expand Down
2 changes: 1 addition & 1 deletion src/Console/Commands/StackCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
24 changes: 0 additions & 24 deletions src/Environments/DockerEnvironment.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public function run(InstallCommand $command): int

$this->runInstallInContainer($command);
$this->reloadDocker($command);
$this->runNpmOnHost($command);

return InstallCommand::SUCCESS;
}
Expand Down Expand Up @@ -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
{
Expand Down