mirror of
https://kevinblog.sytes.net/Code/Jibo-Revival-Group/jibo-cli.git
synced 2026-06-15 15:26:20 +00:00
Initial commit — jibo-cli v3.0.7 with bundled node_modules
This commit is contained in:
73
node_modules/cli-spinner/README.md
generated
vendored
Normal file
73
node_modules/cli-spinner/README.md
generated
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
# node-spinner
|
||||
|
||||
A simple spinner for node cli.
|
||||
|
||||
[](https://nodei.co/npm/cli-spinner/) [](https://nodei.co/npm/cli-spinner/)
|
||||
|
||||
---
|
||||
|
||||
## Installation
|
||||
|
||||
This package is available on [npm](http://npmjs.com) as `cli-spinner`.
|
||||
|
||||
``` sh
|
||||
npm install cli-spinner
|
||||
```
|
||||
|
||||
## Example usage
|
||||
|
||||
````javascript
|
||||
var Spinner = require('cli-spinner').Spinner;
|
||||
|
||||
var spinner = new Spinner('processing.. %s');
|
||||
spinner.setSpinnerString('|/-\\');
|
||||
spinner.start();
|
||||
````
|
||||
|
||||
## API
|
||||
|
||||
**`var obj = new Spinner('title')`**
|
||||
|
||||
Creates a new spinner object with the default options.
|
||||
|
||||
**`obj.start()`**
|
||||
|
||||
Starts the spinner.
|
||||
|
||||
**`obj.stop(clean)`**
|
||||
|
||||
Stops the spinner. Accepts a Boolean parameter to clean the console.
|
||||
|
||||
**`obj.setSpinnerString(spinnerString)`**
|
||||
|
||||
Sets the spinner string. Accepts either a String or an Integer index to reference the [built-in spinners](#demo).
|
||||
|
||||
**`obj.setSpinnerDelay(spinnerDelay)`**
|
||||
|
||||
Sets the spinner animation speed.
|
||||
|
||||
**`Spinner.setDefaultSpinnerString(spinnerString)`**
|
||||
|
||||
Sets the default spinner string for all newly created instances. Accepts either a String or an Integer index to reference the [built-in spinners](#demo).
|
||||
|
||||
**`Spinner.setDefaultSpinnerDelay(spinnerDelay)`**
|
||||
|
||||
Sets the default spinner delay for all newly created instances.
|
||||
|
||||
**`Spinner.setSpinnerTitle(spinnerTitle)`**
|
||||
|
||||
Sets the spinner title. Use printf-style strings to position the spinner.
|
||||
|
||||
**`Spinner.isSpinning()`**
|
||||
|
||||
Returns true/false depending on whether the spinner is currently spinning.
|
||||
|
||||
##Demo
|
||||
|
||||
To see a demonstration of the built-in spinners, point your console at the `example` folder and run:
|
||||
|
||||
````
|
||||
node spinner.js
|
||||
````
|
||||
|
||||

|
||||
Reference in New Issue
Block a user