[ci] format

This commit is contained in:
natemoo-re 2023-01-20 14:54:53 +00:00 committed by Matthew Phillips
parent 624595e353
commit f27570d753

View file

@ -213,7 +213,10 @@ export async function main() {
templateSpinner.text = green('Template copied!'); templateSpinner.text = green('Template copied!');
templateSpinner.succeed(); templateSpinner.succeed();
const install = args.y ? true : (await prompts( const install = args.y
? true
: (
await prompts(
{ {
type: 'confirm', type: 'confirm',
name: 'install', name: 'install',
@ -232,7 +235,8 @@ export async function main() {
process.exit(1); process.exit(1);
}, },
} }
)).install; )
).install;
if (args.dryRun) { if (args.dryRun) {
ora().info(dim(`--dry-run enabled, skipping.`)); ora().info(dim(`--dry-run enabled, skipping.`));
@ -255,11 +259,16 @@ export async function main() {
await info('No problem!', 'Remember to install dependencies after setup.'); await info('No problem!', 'Remember to install dependencies after setup.');
} }
const gitResponse = args.y ? true : (await prompts( const gitResponse = args.y
? true
: (
await prompts(
{ {
type: 'confirm', type: 'confirm',
name: 'git', name: 'git',
message: `Would you like to initialize a new git repository? ${reset(dim('(optional)'))}`, message: `Would you like to initialize a new git repository? ${reset(
dim('(optional)')
)}`,
initial: true, initial: true,
}, },
{ {
@ -270,7 +279,8 @@ export async function main() {
process.exit(1); process.exit(1);
}, },
} }
)).git; )
).git;
if (args.dryRun) { if (args.dryRun) {
ora().info(dim(`--dry-run enabled, skipping.`)); ora().info(dim(`--dry-run enabled, skipping.`));
@ -285,13 +295,14 @@ export async function main() {
} }
if (args.y && !args.typescript) { if (args.y && !args.typescript) {
ora().warn( ora().warn(dim('--typescript <choice> missing. Defaulting to "strict"'));
dim('--typescript <choice> missing. Defaulting to "strict"')
);
args.typescript = 'strict'; args.typescript = 'strict';
} }
const tsResponse = args.typescript || (await prompts( const tsResponse =
args.typescript ||
(
await prompts(
{ {
type: 'select', type: 'select',
name: 'typescript', name: 'typescript',
@ -313,7 +324,8 @@ export async function main() {
process.exit(1); process.exit(1);
}, },
} }
)).typescript; )
).typescript;
if (tsResponse === 'unsure') { if (tsResponse === 'unsure') {
await typescriptByDefault(); await typescriptByDefault();