chore: move all files into packages/create-payload-app

This commit is contained in:
Elliot DeNolf
2023-10-12 18:20:19 -04:00
parent 50a0965561
commit 773be8744d
25 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
import prompts from 'prompts'
import type { CliArgs } from '../types'
export async function parseProjectName(args: CliArgs): Promise<string> {
if (args['--name']) return args['--name']
if (args._[0]) return args._[0]
const response = await prompts(
{
type: 'text',
name: 'value',
message: 'Project name?',
validate: (value: string) => !!value.length,
},
{
onCancel: () => {
process.exit(0)
},
},
)
return response.value
}