Skip to content

Commit

Permalink
Add parameter if we will use Vite
Browse files Browse the repository at this point in the history
Replaces 5110508 as the file is already internal so we don't need to worry about supporting another parameter
  • Loading branch information
caendesilva committed Dec 8, 2024
1 parent e9881cb commit d2793df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/framework/src/Console/Commands/ServeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ protected function printStartMessage(): void
{
$this->useBasicOutput()
? $this->output->writeln('<info>Starting the HydeRC server...</info> Use Ctrl+C to stop')
: $this->console->printStartMessage($this->getHostSelection(), $this->getPortSelection(), $this->getEnvironmentVariables());
: $this->console->printStartMessage($this->getHostSelection(), $this->getPortSelection(), $this->getEnvironmentVariables(), $this->option('vite'));
}

protected function getOutputHandler(): Closure
Expand Down
4 changes: 2 additions & 2 deletions packages/realtime-compiler/src/ConsoleOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function __construct(bool $verbose = false, ?SymfonyOutput $output = null
$this->output = $output ?? new SymfonyOutput();
}

public function printStartMessage(string $host, int $port, array $environment = []): void
public function printStartMessage(string $host, int $port, array $environment = [], ?bool $willUseVite = false): void
{
$url = sprintf('%s://%s:%d', $port === 443 ? 'https' : 'http', $host, $port);

Expand All @@ -36,7 +36,7 @@ public function printStartMessage(string $host, int $port, array $environment =
sprintf('<span class="text-white">Listening on:</span> <a href="%s" class="text-yellow-500">%s</a>', $url, $url),
(config('hyde.server.dashboard.enabled') || Arr::has($environment, 'HYDE_SERVER_DASHBOARD')) && Arr::get($environment, 'HYDE_SERVER_DASHBOARD') === 'enabled' ?
sprintf('<span class="text-white">Live dashboard:</span> <a href="%s/dashboard" class="text-yellow-500">%s/dashboard</a>', $url, $url) : null,
Vite::running() ?
(Vite::running() || $willUseVite) ?
sprintf('<span class="text-white">Vite HMR server:</span> <a href="http://%s:5173" class="text-yellow-500">http://%s:5173</a>', $host, $host) : null,
'',
]);
Expand Down

0 comments on commit d2793df

Please sign in to comment.