easy-cli-framework
Version:
A framework for building CLI applications that are robust and easy to maintain. Supports theming, configuration files, interactive prompts, and more.
18 lines (12 loc) • 392 B
text/typescript
import { EasyCLITheme } from 'easy-cli-framework/themes';
const sleep = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));
const main = async () => {
const theme = new EasyCLITheme(3);
const spinner = theme.getSpinner('success');
spinner.start('Loading...');
await sleep(1000);
spinner.stop();
};
main()
.catch(console.error)
.finally(() => process.exit(0));