From b6dbba38fa882b09918bcbb4fbd69e86a396e881 Mon Sep 17 00:00:00 2001 From: Timothy Miller <46549361+timothymiller@users.noreply.github.com> Date: Mon, 18 Sep 2023 03:22:49 -0400 Subject: [PATCH] Prettier CLI --- apps/cli/bin/index.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/cli/bin/index.js b/apps/cli/bin/index.js index a17cced6d..c619a203f 100755 --- a/apps/cli/bin/index.js +++ b/apps/cli/bin/index.js @@ -18,17 +18,17 @@ const repositoryUrl = 'https://github.com/timothymiller/t4-app' let [projectFolder, ...commandLineArgs] = process.argv.slice(2) // Parse command line arguments correctly even with no projectFolder specified -if(projectFolder && projectFolder.startsWith('--')){ +if (projectFolder && projectFolder.startsWith('--')) { commandLineArgs.push(projectFolder) projectFolder = undefined } -if(!projectFolder && commandLineArgs.length > 1){ - commandLineArgs.every((arg)=>{ - if(!arg.startsWith('--')){ +if (!projectFolder && commandLineArgs.length > 1) { + commandLineArgs.every((arg) => { + if (!arg.startsWith('--')) { projectFolder = arg return false } - return true + return true }) } const useTauri = commandLineArgs.includes('--tauri') @@ -148,7 +148,7 @@ console.log(chalk.green.bold(logo)) console.log(chalk.magentaBright.bold('\n"Type-Safe, Full-Stack Starter Kit for React Native + Web"')) console.log(chalk.magentaBright.bold(' ft. Tamagui + TypeScript + tRPC + Turborepo')) -if(repositoryBranch){ +if (repositoryBranch) { console.log(chalk.yellow.bold(`\n⚠ Cloning ${repositoryBranch.replace('-b', '').replace('--single-branch', '').trim()} branch.`)) }