Skip to content

Commit fc8b9b9

Browse files
authoredJan 13, 2025··
chore: apply automated updates
1 parent b5f5414 commit fc8b9b9

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed
 

‎examples/prompt.mjs

+16-9
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,21 @@ import { consola } from "../dist/index.mjs";
55
const name = await consola.prompt("What is your name?", {
66
placeholder: "Not sure",
77
initial: "java",
8-
cancel: 'undefined'
8+
cancel: "undefined",
99
});
1010

11-
if (!name) { process.exit(1) }
11+
if (!name) {
12+
process.exit(1);
13+
}
1214

1315
const confirmed = await consola.prompt("Do you want to continue?", {
1416
type: "confirm",
15-
cancel: 'undefined'
17+
cancel: "undefined",
1618
});
1719

18-
if (!confirmed) { process.exit(1) }
20+
if (!confirmed) {
21+
process.exit(1);
22+
}
1923

2024
const projectType = await consola.prompt("Pick a project type.", {
2125
type: "select",
@@ -24,11 +28,13 @@ const projectType = await consola.prompt("Pick a project type.", {
2428
"TypeScript",
2529
{ label: "CoffeeScript", value: "CoffeeScript", hint: "oh no" },
2630
],
27-
cancel: 'undefined',
31+
cancel: "undefined",
2832
initial: "TypeScript",
2933
});
3034

31-
if (!projectType) { process.exit(1) }
35+
if (!projectType) {
36+
process.exit(1);
37+
}
3238

3339
const tools = await consola.prompt("Select additional tools.", {
3440
type: "multiselect",
@@ -38,12 +44,13 @@ const tools = await consola.prompt("Select additional tools.", {
3844
{ value: "prettier", label: "Prettier" },
3945
{ value: "gh-action", label: "GitHub Action" },
4046
],
41-
cancel: 'undefined',
47+
cancel: "undefined",
4248
initial: ["eslint", "prettier"],
4349
});
4450

45-
if (!tools) { process.exit(1) }
46-
51+
if (!tools) {
52+
process.exit(1);
53+
}
4754

4855
consola.start("Creating project...");
4956
await new Promise((resolve) => setTimeout(resolve, 1000));

0 commit comments

Comments
 (0)
Please sign in to comment.