@@ -19,7 +19,9 @@ const brandColor = /** @type {const} */ ([174, 128, 255]);
1919 const packageManager = / y a r n / . test ( process . env . npm_execpath ) ? 'yarn' : 'npm' ;
2020
2121 prompts . intro (
22- kl . trueColor ( ...brandColor ) ( 'Preact - Fast 3kB alternative to React with the same modern API' )
22+ kl . trueColor ( ...brandColor ) (
23+ 'Preact - Fast 3kB alternative to React with the same modern API' ,
24+ ) ,
2325 ) ;
2426
2527 const { dir, language, useRouter, useESLint, appType } = await prompts . group (
@@ -36,14 +38,15 @@ const brandColor = /** @type {const} */ ([174, 128, 255]);
3638 }
3739 } ,
3840 } ) ,
39- appType : ( ) => prompts . select ( {
40- message : 'Project Type:' ,
41- initialValue : 'spa' ,
42- options : [
43- { value : 'spa' , label : 'Single Page Application (only client-side)' } ,
44- { value : 'ssg' , label : 'Static Site Generation (prerenders pages)' } ,
45- ] ,
46- } ) ,
41+ appType : ( ) =>
42+ prompts . select ( {
43+ message : 'Project Type:' ,
44+ initialValue : 'spa' ,
45+ options : [
46+ { value : 'spa' , label : 'Single Page Application (only client-side)' } ,
47+ { value : 'ssg' , label : 'Static Site Generation (prerenders pages)' } ,
48+ ] ,
49+ } ) ,
4750 language : ( ) =>
4851 prompts . select ( {
4952 message : 'Project language:' ,
@@ -53,11 +56,13 @@ const brandColor = /** @type {const} */ ([174, 128, 255]);
5356 { value : 'ts' , label : 'TypeScript' } ,
5457 ] ,
5558 } ) ,
56- useRouter : ( { results } ) => results . appType === 'spa' ?
57- prompts . confirm ( {
58- message : 'Use router?' ,
59- initialValue : false ,
60- } ) : Promise . resolve ( false ) ,
59+ useRouter : ( { results } ) =>
60+ results . appType === 'spa'
61+ ? prompts . confirm ( {
62+ message : 'Use router?' ,
63+ initialValue : false ,
64+ } )
65+ : Promise . resolve ( false ) ,
6166 useESLint : ( ) =>
6267 prompts . confirm ( {
6368 message : 'Use ESLint?' ,
@@ -77,13 +82,13 @@ const brandColor = /** @type {const} */ ([174, 128, 255]);
7782 await useSpinner (
7883 'Setting up your project directory...' ,
7984 ( ) => scaffold ( targetDir , { useTS, useRouter, useESLint, appType } ) ,
80- 'Set up project directory'
85+ 'Set up project directory' ,
8186 ) ;
8287
8388 await useSpinner (
8489 'Installing project dependencies...' ,
8590 ( ) => installDeps ( targetDir , packageManager , { useTS, useRouter, useESLint, appType } ) ,
86- 'Installed project dependencies'
91+ 'Installed project dependencies' ,
8792 ) ;
8893
8994 if ( ! skipHint ) {
0 commit comments