@@ -5,17 +5,21 @@ import { consola } from "../dist/index.mjs";
5
5
const name = await consola . prompt ( "What is your name?" , {
6
6
placeholder : "Not sure" ,
7
7
initial : "java" ,
8
- cancel : ' undefined'
8
+ cancel : " undefined" ,
9
9
} ) ;
10
10
11
- if ( ! name ) { process . exit ( 1 ) }
11
+ if ( ! name ) {
12
+ process . exit ( 1 ) ;
13
+ }
12
14
13
15
const confirmed = await consola . prompt ( "Do you want to continue?" , {
14
16
type : "confirm" ,
15
- cancel : ' undefined'
17
+ cancel : " undefined" ,
16
18
} ) ;
17
19
18
- if ( ! confirmed ) { process . exit ( 1 ) }
20
+ if ( ! confirmed ) {
21
+ process . exit ( 1 ) ;
22
+ }
19
23
20
24
const projectType = await consola . prompt ( "Pick a project type." , {
21
25
type : "select" ,
@@ -24,11 +28,13 @@ const projectType = await consola.prompt("Pick a project type.", {
24
28
"TypeScript" ,
25
29
{ label : "CoffeeScript" , value : "CoffeeScript" , hint : "oh no" } ,
26
30
] ,
27
- cancel : ' undefined' ,
31
+ cancel : " undefined" ,
28
32
initial : "TypeScript" ,
29
33
} ) ;
30
34
31
- if ( ! projectType ) { process . exit ( 1 ) }
35
+ if ( ! projectType ) {
36
+ process . exit ( 1 ) ;
37
+ }
32
38
33
39
const tools = await consola . prompt ( "Select additional tools." , {
34
40
type : "multiselect" ,
@@ -38,12 +44,13 @@ const tools = await consola.prompt("Select additional tools.", {
38
44
{ value : "prettier" , label : "Prettier" } ,
39
45
{ value : "gh-action" , label : "GitHub Action" } ,
40
46
] ,
41
- cancel : ' undefined' ,
47
+ cancel : " undefined" ,
42
48
initial : [ "eslint" , "prettier" ] ,
43
49
} ) ;
44
50
45
- if ( ! tools ) { process . exit ( 1 ) }
46
-
51
+ if ( ! tools ) {
52
+ process . exit ( 1 ) ;
53
+ }
47
54
48
55
consola . start ( "Creating project..." ) ;
49
56
await new Promise ( ( resolve ) => setTimeout ( resolve , 1000 ) ) ;
0 commit comments