refactor: simplify initial prompt message for tsconfig path
This commit is contained in:
parent
7a13dd73aa
commit
1b53018951
|
|
@ -138,9 +138,8 @@ export async function promptForConfig(
|
||||||
name: 'tsConfigPath',
|
name: 'tsConfigPath',
|
||||||
message: (prev, values) => `Where is your ${highlight(values.typescript ? 'tsconfig.json' : 'jsconfig.json')} file?`,
|
message: (prev, values) => `Where is your ${highlight(values.typescript ? 'tsconfig.json' : 'jsconfig.json')} file?`,
|
||||||
initial: (prev, values) => {
|
initial: (prev, values) => {
|
||||||
const prefix = values.framework === 'nuxt' ? '.nuxt/' : './'
|
const path = values.typescript ? './tsconfig.json' : './jsconfig.json'
|
||||||
const path = values.framework === 'nuxt' ? 'tsconfig.json' : values.typescript ? 'tsconfig.json' : 'jsconfig.json'
|
return path
|
||||||
return prefix + path
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user