Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/echosoar/light-spinner
EN Description: This is a no-dependencies minimal cli spinners, only 1KB. ZH-CN: 命令行进度旋转展示器,无任何依赖,超轻量
https://github.com/echosoar/light-spinner
cli cli-spinner no-dependencies node-spinner spinner statusbar terminal terminal-spinner
Last synced: 8 days ago
JSON representation
EN Description: This is a no-dependencies minimal cli spinners, only 1KB. ZH-CN: 命令行进度旋转展示器,无任何依赖,超轻量
- Host: GitHub
- URL: https://github.com/echosoar/light-spinner
- Owner: echosoar
- License: mit
- Created: 2020-07-04T10:05:41.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-10-08T06:27:14.000Z (about 3 years ago)
- Last Synced: 2024-04-29T09:22:07.419Z (6 months ago)
- Topics: cli, cli-spinner, no-dependencies, node-spinner, spinner, statusbar, terminal, terminal-spinner
- Language: TypeScript
- Homepage:
- Size: 811 KB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
light spinner
This is a no-dependencies minimal cli spinner, only 1kb.
## Install
```shell
$ npm i light-spinner --save
```
## Usage
```ts
import Spin from 'light-spinner';
const spin = new Spin({
text: 'test',
});
spin.start();// change text
spin.text = 'test 2';spin.stop();
```## Options
| option | type | desc | default |
| --- | --- | --- | --- |
| text | string | console text | empty string |
| timeout | number | the time of changing to next frame | 100(ms) |
| spinners | string[] | frame list | `['⠋', '⠙', '⠹', '⠼', '⠴', '⠦', '⠧', '⠏']` |
| stream | WritableStream | the stream to send the output to | stdout |[MIT LICENSE](./LICENSE)