0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-02-10 22:38:53 -05:00

[ci] format

This commit is contained in:
natemoo-re 2023-02-16 20:30:05 +00:00 committed by fredkbot
parent 066b4b4efc
commit c7dee0ada3
4 changed files with 12 additions and 9 deletions

View file

@ -1,7 +1,7 @@
import type { Context } from './context'; import type { Context } from './context';
import { execa } from 'execa'; import { execa } from 'execa';
import { info, error, spinner, title } from '../messages.js'; import { error, info, spinner, title } from '../messages.js';
export async function dependencies( export async function dependencies(
ctx: Pick<Context, 'install' | 'yes' | 'prompt' | 'pkgManager' | 'cwd' | 'dryRun'> ctx: Pick<Context, 'install' | 'yes' | 'prompt' | 'pkgManager' | 'cwd' | 'dryRun'>

View file

@ -4,7 +4,7 @@ import type { Context } from './context';
import { color } from '@astrojs/cli-kit'; import { color } from '@astrojs/cli-kit';
import { execa } from 'execa'; import { execa } from 'execa';
import { info, spinner, error, title } from '../messages.js'; import { error, info, spinner, title } from '../messages.js';
export async function git(ctx: Pick<Context, 'cwd' | 'git' | 'yes' | 'prompt' | 'dryRun'>) { export async function git(ctx: Pick<Context, 'cwd' | 'git' | 'yes' | 'prompt' | 'dryRun'>) {
if (fs.existsSync(path.join(ctx.cwd, '.git'))) { if (fs.existsSync(path.join(ctx.cwd, '.git'))) {
@ -29,7 +29,8 @@ export async function git(ctx: Pick<Context, 'cwd' | 'git' | 'yes' | 'prompt' |
await spinner({ await spinner({
start: 'Git initializing...', start: 'Git initializing...',
end: 'Git initialized', end: 'Git initialized',
while: () => init({ cwd: ctx.cwd }).catch((e) => { while: () =>
init({ cwd: ctx.cwd }).catch((e) => {
// eslint-disable-next-line no-console // eslint-disable-next-line no-console
error('error', e); error('error', e);
process.exit(1); process.exit(1);

View file

@ -34,7 +34,8 @@ export async function template(
await spinner({ await spinner({
start: 'Template copying...', start: 'Template copying...',
end: 'Template copied', end: 'Template copied',
while: () => copyTemplate(ctx.template!, ctx as Context).catch((e) => { while: () =>
copyTemplate(ctx.template!, ctx as Context).catch((e) => {
// eslint-disable-next-line no-console // eslint-disable-next-line no-console
error('error', e); error('error', e);
process.exit(1); process.exit(1);

View file

@ -61,7 +61,8 @@ export async function typescript(
await spinner({ await spinner({
start: 'TypeScript customizing...', start: 'TypeScript customizing...',
end: 'TypeScript customized', end: 'TypeScript customized',
while: () => setupTypeScript(ts!, { cwd: ctx.cwd }).catch((e) => { while: () =>
setupTypeScript(ts!, { cwd: ctx.cwd }).catch((e) => {
// eslint-disable-next-line no-console // eslint-disable-next-line no-console
error('error', e); error('error', e);
process.exit(1); process.exit(1);