mirror of
https://github.com/withastro/astro.git
synced 2024-12-30 22:03:56 -05:00
24 lines
571 B
TypeScript
24 lines
571 B
TypeScript
|
import { type Context } from './context';
|
||
|
|
||
|
import { banner, welcome, say } from '../messages.js';
|
||
|
import { label, color } from '@astrojs/cli-kit';
|
||
|
import { random } from '@astrojs/cli-kit/utils';
|
||
|
|
||
|
export async function intro(ctx: Pick<Context, 'skipHouston'|'version'|'username'>) {
|
||
|
if (!ctx.skipHouston) {
|
||
|
await say([
|
||
|
[
|
||
|
'Welcome',
|
||
|
'to',
|
||
|
label('astro', color.bgGreen, color.black),
|
||
|
color.green(`v${ctx.version}`) + ',',
|
||
|
`${ctx.username}!`,
|
||
|
],
|
||
|
random(welcome),
|
||
|
]);
|
||
|
await banner(ctx.version);
|
||
|
} else {
|
||
|
await banner(ctx.version);
|
||
|
}
|
||
|
}
|