diff options
author | 2022-04-06 17:19:49 +0000 | |
---|---|---|
committer | 2022-04-06 17:19:49 +0000 | |
commit | debdf11b1919cb4f4ca42d08b0a543ac10defcf3 (patch) | |
tree | 61e4c7918135cb8a41978948afc8f4f36d118cf4 | |
parent | d0777ad3aff0084d7fc0e159ac32ebea062d921c (diff) | |
download | astro-debdf11b1919cb4f4ca42d08b0a543ac10defcf3.tar.gz astro-debdf11b1919cb4f4ca42d08b0a543ac10defcf3.tar.zst astro-debdf11b1919cb4f4ca42d08b0a543ac10defcf3.zip |
[ci] format
-rw-r--r-- | packages/astro/src/cli/index.ts | 17 | ||||
-rw-r--r-- | packages/astro/src/cli/open.ts | 4 |
2 files changed, 15 insertions, 6 deletions
diff --git a/packages/astro/src/cli/index.ts b/packages/astro/src/cli/index.ts index 5d6612b43..bb0307667 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 ad803513e..1227ebff4 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<ExecaChildProcess> { const [command, args = []] = getPlatformSpecificCommand(); return execa(command, [...args, encodeURI(url)]); -}; +} |