Skip to content

Commit 5a01d53

Browse files
committedApr 11, 2023
refactor(fancy): better start color and icon
1 parent 99c2a4f commit 5a01d53

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed
 

Diff for: ‎examples/prompt.ts

+4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ async function main() {
2828
{ value: "gh-action", label: "GitHub Action" },
2929
],
3030
});
31+
32+
await consola.start("Creating project...");
33+
await new Promise((resolve) => setTimeout(resolve, 1000));
34+
await consola.success("Project created!");
3135
}
3236

3337
main();

Diff for: ‎examples/spinner.ts

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { consola } from "./utils";
2+
3+
async function main() {
4+
await consola.start("Creating project...");
5+
await new Promise((resolve) => setTimeout(resolve, 1000));
6+
await consola.success("Project created!");
7+
}
8+
9+
main();

Diff for: ‎src/reporters/fancy.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const TYPE_COLOR_MAP: { [k in LogType]?: string } = {
1111
fail: "red",
1212
success: "green",
1313
ready: "green",
14-
start: "yellow",
14+
start: "magenta",
1515
};
1616

1717
export const LEVEL_COLOR_MAP: { [k in LogLevel]?: string } = {
@@ -31,7 +31,7 @@ const TYPE_ICONS: { [k in LogType]?: string } = {
3131
debug: s("⚙", "D"),
3232
trace: s("→", "→"),
3333
fail: s("✖", "×"),
34-
start: s("", "S"),
34+
start: s("", "o"),
3535
log: "",
3636
};
3737

0 commit comments

Comments
 (0)
Please sign in to comment.