diff --git a/packages/create-astro/src/actions/intro.ts b/packages/create-astro/src/actions/intro.ts index 9b2621ed85..2a6e866c80 100644 --- a/packages/create-astro/src/actions/intro.ts +++ b/packages/create-astro/src/actions/intro.ts @@ -4,7 +4,9 @@ import { color, label } from '@astrojs/cli-kit'; import { random } from '@astrojs/cli-kit/utils'; import { banner, say, welcome } from '../messages.js'; -export async function intro(ctx: Pick) { +export async function intro( + ctx: Pick +) { banner(); if (!ctx.skipHouston) { @@ -14,8 +16,10 @@ export async function intro(ctx: Pick ((version ? color.green(`v${version}`) : '') + ',')), - Promise.resolve(ctx.username).then(username => `${username}!`), + Promise.resolve(ctx.version).then( + (version) => (version ? color.green(`v${version}`) : '') + ',' + ), + Promise.resolve(ctx.username).then((username) => `${username}!`), ], random(welcome), ], diff --git a/packages/create-astro/src/messages.ts b/packages/create-astro/src/messages.ts index 7e276308ef..29c551883a 100644 --- a/packages/create-astro/src/messages.ts +++ b/packages/create-astro/src/messages.ts @@ -92,7 +92,7 @@ export const banner = () => { const prefix = `astro`; const suffix = `Launch sequence initiated.`; log(`${label(prefix, color.bgGreen, color.black)} ${suffix}`); -} +}; export const bannerAbort = () => log(`\n${label('astro', color.bgRed)} ${color.bold('Launch sequence aborted.')}`);