feat(create-medusa-app): improve spinner style (#5474)

* feat(create-medusa-app): improve spinner style

* remove comment
This commit is contained in:
Shahed Nasser authored and GitHub committed 2023-10-31 08:02:40 +01:00
1 parent 399005cc58
commit 03959c3e3a
2 files changed
+7 -6

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
---
"create-medusa-app": patch
---
feat(create-medusa-app): improve spinner style
@@ -40,8 +40,8 @@ export const getFact = () => {
export const showFact = (spinner: Ora, title: string) => { export const showFact = (spinner: Ora, title: string) => {
const fact = getFact() const fact = getFact()
spinner.text = `${boxen(`${emojify(":bulb:")} Medusa Tips\n\n${fact}`, { spinner.text = `${title}\n${boxen(`${fact}`, {
title: chalk.cyan(title), title: chalk.cyan(`${emojify(":bulb:")} Medusa Tips`),
titleAlignment: "center", titleAlignment: "center",
textAlignment: "center", textAlignment: "center",
padding: 1, padding: 1,
@@ -54,9 +54,6 @@ export const createFactBox = (
title: string, title: string,
processManager: ProcessManager processManager: ProcessManager
): NodeJS.Timer => { ): NodeJS.Timer => {
spinner.spinner = {
frames: [""],
}
showFact(spinner, title) showFact(spinner, title)
const interval = setInterval(() => { const interval = setInterval(() => {
showFact(spinner, title) showFact(spinner, title)
@@ -78,7 +75,6 @@ export const resetFactBox = (
clearInterval(interval) clearInterval(interval)
} }
spinner.spinner = "dots"
spinner.succeed(chalk.green(successMessage)).start() spinner.succeed(chalk.green(successMessage)).start()
let newInterval = null let newInterval = null
if (newTitle) { if (newTitle) {