diff --git a/packages/astro/src/cli/index.ts b/packages/astro/src/cli/index.ts index 5d6612b43404..bb0307667230 100644 --- a/packages/astro/src/cli/index.ts +++ b/packages/astro/src/cli/index.ts @@ -18,7 +18,16 @@ import { printHelp, formatErrorMessage, formatConfigErrorMessage } from '../core import { createSafeError } from '../core/util.js'; type Arguments = yargs.Arguments; -type CLICommand = 'help' | 'version' | 'add' | 'docs' | 'dev' | 'build' | 'preview' | 'reload' | 'check'; +type CLICommand = + | 'help' + | 'version' + | 'add' + | 'docs' + | 'dev' + | 'build' + | 'preview' + | 'reload' + | 'check'; /** Display --help flag */ function printAstroHelp() { @@ -27,7 +36,7 @@ function printAstroHelp() { headline: 'Futuristic web development tool.', commands: [ ['add', 'Add an integration to your configuration.'], - ['docs', 'Launch Astro\'s Doc site directly from the terminal. '], + ['docs', "Launch Astro's Doc site directly from the terminal. "], ['dev', 'Run Astro in development mode.'], ['build', 'Build a pre-compiled production-ready site.'], ['preview', 'Preview your build locally before deploying.'], @@ -148,9 +157,9 @@ export async function cli(args: string[]) { case 'docs': { try { - return await openInBrowser('https://docs.astro.build/') + return await openInBrowser('https://docs.astro.build/'); } catch (err) { - return throwAndExit(err) + return throwAndExit(err); } } diff --git a/packages/astro/src/cli/open.ts b/packages/astro/src/cli/open.ts index ad803513e347..1227ebff4ab3 100644 --- a/packages/astro/src/cli/open.ts +++ b/packages/astro/src/cli/open.ts @@ -5,7 +5,7 @@ import { execa } from 'execa'; * Credit: Azhar22 * @see https://github.com/azhar22k/ourl/blob/master/index.js */ -const getPlatformSpecificCommand = (): [string]|[string, string[]] => { +const getPlatformSpecificCommand = (): [string] | [string, string[]] => { const isGitPod = Boolean(process.env.GITPOD_REPO_ROOT); const platform = isGitPod ? 'gitpod' : process.platform; @@ -29,4 +29,4 @@ const getPlatformSpecificCommand = (): [string]|[string, string[]] => { export async function openInBrowser(url: string): Promise { const [command, args = []] = getPlatformSpecificCommand(); return execa(command, [...args, encodeURI(url)]); -}; +}