mirror of
https://github.com/withastro/astro.git
synced 2024-12-23 21:53:55 -05:00
[ci] format
This commit is contained in:
parent
ed952b4cea
commit
3be8b67f89
2 changed files with 8 additions and 4 deletions
|
@ -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<Context, 'hat' | 'skipHouston' | 'version' | 'username' | 'fancy'>) {
|
||||
export async function intro(
|
||||
ctx: Pick<Context, 'hat' | 'skipHouston' | 'version' | 'username' | 'fancy'>
|
||||
) {
|
||||
banner();
|
||||
|
||||
if (!ctx.skipHouston) {
|
||||
|
@ -14,8 +16,10 @@ export async function intro(ctx: Pick<Context, 'hat' | 'skipHouston' | 'version'
|
|||
'Welcome',
|
||||
'to',
|
||||
label('astro', color.bgGreen, color.black),
|
||||
Promise.resolve(ctx.version).then(version => ((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),
|
||||
],
|
||||
|
|
|
@ -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.')}`);
|
||||
|
|
Loading…
Reference in a new issue