Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/bombshell-dev/clack. Effortlessly build beautiful command-line apps bomb.sh/docs/clack/basics/getting-started
Something went wrong. Try again.
1234567891011121314151617181920212223import * as p from '@clack/prompts';
p.intro('spinner start...');
const spin = p.spinner();const total = 6000;let progress = 0;spin.start();
new Promise((resolve) => { const timer = setInterval(() => { progress = Math.min(total, progress + 100); if (progress >= total) { clearInterval(timer); resolve(true); } spin.message(`Loading packages [${progress}/${total}]`); // <=== }, 100);}).then(() => { spin.stop('Done'); p.outro('spinner stop...');});