UNPKG

823 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var ora = require("ora");
4var instance = ora();
5var lastMsg = null;
6exports.default = {
7 start: function (msg) {
8 instance.start(msg);
9 lastMsg = msg;
10 },
11 log: function (msg) {
12 instance.text = msg;
13 lastMsg = msg;
14 },
15 // it persists the message if defined
16 succeed: function (msg) {
17 if (msg) {
18 instance.succeed(msg);
19 }
20 },
21 fail: function (msg) {
22 instance.fail(msg);
23 },
24 // it persists the message
25 info: function (msg) {
26 instance.info(msg);
27 this.start(lastMsg);
28 },
29 // it persists the message
30 warn: function (msg) {
31 instance.warn(msg);
32 this.start(lastMsg);
33 }
34};
35//# sourceMappingURL=spinner.js.map
\No newline at end of file