@@ -27,14 +27,20 @@ export async function generateHostingConfig(dest: string, flags: CreateOptions)
2727
2828 if ( provider === 'skip' ) {
2929 prompts . log . message (
30- `${ chalk . blue ( 'hosting provider config [skip]' ) } You can configure hosting provider settings manually later.`
30+ `${ chalk . blue (
31+ 'hosting provider config [skip]'
32+ ) } You can configure hosting provider settings manually later.`
3133 ) ;
34+
3235 return provider ;
3336 }
3437
35- prompts . log . info ( `${ chalk . blue ( 'Hosting Configuration' ) } Setting up configuration for ${ provider } ` ) ;
38+ prompts . log . info (
39+ `${ chalk . blue ( 'Hosting Configuration' ) } Setting up configuration for ${ provider } `
40+ ) ;
3641
3742 const resolvedDest = path . resolve ( dest ) ;
43+
3844 if ( ! fs . existsSync ( resolvedDest ) ) {
3945 fs . mkdirSync ( resolvedDest , { recursive : true } ) ;
4046 }
@@ -43,18 +49,24 @@ export async function generateHostingConfig(dest: string, flags: CreateOptions)
4349 let filename : string | undefined ;
4450
4551 switch ( provider ) {
46- case 'Vercel' :
47- config = typeof vercelConfigRaw === 'string' ? vercelConfigRaw : JSON . stringify ( vercelConfigRaw , null , 2 ) ;
52+ case 'Vercel' : {
53+ config =
54+ typeof vercelConfigRaw === 'string'
55+ ? vercelConfigRaw
56+ : JSON . stringify ( vercelConfigRaw , null , 2 ) ;
4857 filename = 'vercel.json' ;
4958 break ;
50- case 'Netlify' :
59+ }
60+ case 'Netlify' : {
5161 config = netlifyConfigRaw ;
5262 filename = 'netlify.toml' ;
5363 break ;
54- case 'Cloudflare' :
64+ }
65+ case 'Cloudflare' : {
5566 config = cloudflareConfigRaw ;
5667 filename = '_headers' ;
5768 break ;
69+ }
5870 }
5971
6072 if ( config && filename ) {
@@ -72,4 +84,3 @@ export async function generateHostingConfig(dest: string, flags: CreateOptions)
7284
7385 return provider ;
7486}
75-
0 commit comments