From 6d885a7f6fdffa8400bb72064d6b2fb097a9ec37 Mon Sep 17 00:00:00 2001 From: Cat++ <69035887+NotGhex@users.noreply.github.com> Date: Mon, 10 Jun 2024 13:19:49 +0800 Subject: [PATCH] spinner gone --- packages/create-reciple/src/classes/TemplateBuilder.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/create-reciple/src/classes/TemplateBuilder.ts b/packages/create-reciple/src/classes/TemplateBuilder.ts index e7c03e53..186c7b5e 100644 --- a/packages/create-reciple/src/classes/TemplateBuilder.ts +++ b/packages/create-reciple/src/classes/TemplateBuilder.ts @@ -145,7 +145,7 @@ export class TemplateBuilder implements TemplateBuilderOptions { done++; - this.persistSpinner({ symbol: kleur.bold().green(' +'), text: `Installed addon ${kleur.cyan(addon.module + '@' + (addon.version ?? 'latest'))}` }); + this.persistSpinner({ symbol: kleur.bold().green(' +'), text: `Installed addon ${kleur.cyan(addon.module + '@' + (addon.version ?? 'latest'))}` }); this.setSpinnerText(`Installing ${kleur.cyan(addons.length + ' addons')} ${kleur.gray('('+ done +'/'+ addons.length +')')}...`); } @@ -179,6 +179,13 @@ export class TemplateBuilder implements TemplateBuilderOptions { public persistSpinner(options: PersistOptions): void { if (!this.spinner) return; + + const spinner = this.spinner.spinner; + const color = this.spinner.color; + this.spinner = this.spinner.stopAndPersist(options); + this.spinner.spinner = spinner; + this.spinner.color = color; + this.spinner.start(); } }