Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add text before a spinner #217

Open
kernelwernel opened this issue Nov 20, 2022 · 1 comment
Open

How to add text before a spinner #217

kernelwernel opened this issue Nov 20, 2022 · 1 comment

Comments

@kernelwernel
Copy link

So, I essentially want to add something before the spinner, like this:

┌─[ (spinner animation) Loading modules...
└──> Done!

I know how to edit the second line but I just can't figure out a way to put something behind the animation. This is what I tried:

console.log("┌─[ ") 
var spinner = await term.spinner('dotSpinner');
console.log("Loading modules...");
@psulek
Copy link

psulek commented Feb 23, 2023

@Existential-Kernel you need to use term instead of console.log, for your situation use:

await term('┌─[ ').spinner('dotSpinner');
term(' Loading modules...');
// some work here...
term('\n└──> Done!');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants