Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fabiospampinato/tiny-spinner

A simple, yet beautiful, CLI spinner.
https://github.com/fabiospampinato/tiny-spinner

cli loading pretty spinner terminal tiny

Last synced: about 1 month ago
JSON representation

A simple, yet beautiful, CLI spinner.

Awesome Lists containing this project

README

        


Demo

# Tiny Spinner

A simple, yet beautiful, CLI spinner.

## Install

```sh
npm install --save tiny-spinner
```

## Usage

```ts
import Spinner from 'tiny-spinner';

// Create spinner

const spinner = new Spinner ();

// Start spinner with initial message

spinner.start ( 'Doing something' );

// Update message

spinner.update ( 'Still doing something' );

// Exit with a warning message

spinner.warning ( 'Some warning message' );

// Exit with an error message

spinner.error ( 'Some error message' );

// Exit with a success message

spinner.success ( 'Some success message' );

// Exit with a custom message (no prefix symbol)

spinner.stop ( 'Some stop message' );

// Exit without a message

spinner.stop ();
```

## License

MIT © Fabio Spampinato