From 2bdce4c4a0f2720b9c06d2025f98cddec5e22599 Mon Sep 17 00:00:00 2001 From: Nate Moore Date: Fri, 25 Aug 2023 18:09:30 -0500 Subject: [PATCH] feat(create-astro): --fancy (#8235) --- packages/create-astro/src/actions/context.ts | 2 ++ packages/create-astro/src/actions/intro.ts | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/create-astro/src/actions/context.ts b/packages/create-astro/src/actions/context.ts index 172976b95..5c2c0e9c0 100644 --- a/packages/create-astro/src/actions/context.ts +++ b/packages/create-astro/src/actions/context.ts @@ -13,6 +13,7 @@ export interface Context { username: string; version: string; skipHouston: boolean; + fancy?: boolean; dryRun?: boolean; yes?: boolean; projectName?: string; @@ -88,6 +89,7 @@ export async function getContext(argv: string[]): Promise { username, version, skipHouston, + fancy, dryRun, projectName, template, diff --git a/packages/create-astro/src/actions/intro.ts b/packages/create-astro/src/actions/intro.ts index e5d68069f..e09b71642 100644 --- a/packages/create-astro/src/actions/intro.ts +++ b/packages/create-astro/src/actions/intro.ts @@ -4,8 +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) { if (!ctx.skipHouston) { + const hat = ctx.fancy ? random(['๐ŸŽฉ', '๐ŸŽฉ', '๐Ÿ‘‘', '๐Ÿงข', '๐Ÿฆ']) : undefined; await say([ [ 'Welcome', @@ -15,7 +16,7 @@ export async function intro(ctx: Pick