[ci] format
This commit is contained in:
parent
066b4b4efc
commit
c7dee0ada3
4 changed files with 12 additions and 9 deletions
|
@ -1,7 +1,7 @@
|
|||
import type { Context } from './context';
|
||||
|
||||
import { execa } from 'execa';
|
||||
import { info, error, spinner, title } from '../messages.js';
|
||||
import { error, info, spinner, title } from '../messages.js';
|
||||
|
||||
export async function dependencies(
|
||||
ctx: Pick<Context, 'install' | 'yes' | 'prompt' | 'pkgManager' | 'cwd' | 'dryRun'>
|
||||
|
|
|
@ -4,7 +4,7 @@ import type { Context } from './context';
|
|||
|
||||
import { color } from '@astrojs/cli-kit';
|
||||
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'>) {
|
||||
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({
|
||||
start: 'Git initializing...',
|
||||
end: 'Git initialized',
|
||||
while: () => init({ cwd: ctx.cwd }).catch((e) => {
|
||||
while: () =>
|
||||
init({ cwd: ctx.cwd }).catch((e) => {
|
||||
// eslint-disable-next-line no-console
|
||||
error('error', e);
|
||||
process.exit(1);
|
||||
|
|
|
@ -34,11 +34,12 @@ export async function template(
|
|||
await spinner({
|
||||
start: 'Template copying...',
|
||||
end: 'Template copied',
|
||||
while: () => copyTemplate(ctx.template!, ctx as Context).catch((e) => {
|
||||
// eslint-disable-next-line no-console
|
||||
error('error', e);
|
||||
process.exit(1);
|
||||
}),
|
||||
while: () =>
|
||||
copyTemplate(ctx.template!, ctx as Context).catch((e) => {
|
||||
// eslint-disable-next-line no-console
|
||||
error('error', e);
|
||||
process.exit(1);
|
||||
}),
|
||||
});
|
||||
} else {
|
||||
ctx.exit(1);
|
||||
|
|
|
@ -61,7 +61,8 @@ export async function typescript(
|
|||
await spinner({
|
||||
start: 'TypeScript customizing...',
|
||||
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
|
||||
error('error', e);
|
||||
process.exit(1);
|
||||
|
|
Loading…
Reference in a new issue