Skip to content

Commit 64c4db8

Browse files
committed
fix celebrate
1 parent 84beaa1 commit 64c4db8

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

src/cli/celebration.js

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,21 @@ const frames = [
2222
`
2323
];
2424

25+
// Create a multi-color border effect
26+
function colorBorder(message) {
27+
const border = '===============================';
28+
return `
29+
${chalk.blue(border)}
30+
${chalk.green(message)}
31+
${chalk.magenta(border)}
32+
`;
33+
}
34+
2535
export function celebrate(message) {
2636
let frameIndex = 0;
2737
const animation = setInterval(() => {
2838
process.stdout.write('\x1B[2J\x1B[3J\x1B[H');
29-
console.log(chalk.rainbow(`
30-
===============================
31-
${message}
32-
===============================
33-
`));
39+
console.log(colorBorder(message));
3440
console.log(chalk.cyan(frames[frameIndex]));
3541
frameIndex = (frameIndex + 1) % frames.length;
3642
}, 200);
@@ -39,10 +45,6 @@ export function celebrate(message) {
3945
setTimeout(() => {
4046
clearInterval(animation);
4147
process.stdout.write('\x1B[2J\x1B[3J\x1B[H');
42-
console.log(chalk.green(`
43-
===============================
44-
${message}
45-
===============================
46-
`));
48+
console.log(colorBorder(message));
4749
}, 2000);
4850
}

0 commit comments

Comments
 (0)