diff --git a/dist/beautylog.classes.d.ts b/dist/beautylog.classes.d.ts
index 4b7955a..283e56d 100644
--- a/dist/beautylog.classes.d.ts
+++ b/dist/beautylog.classes.d.ts
@@ -1,4 +1,4 @@
import { Table } from "./beautylog.classes.table";
import { Ora } from "./beautylog.classes.ora";
export declare let table: (tableTypeArg: string, tableHeadArrayArg?: string[]) => Table;
-export declare let ora: (textArg: string, colorArg: string) => Ora;
+export declare let ora: (textArg: string, colorArg: string, startArg?: boolean) => Ora;
diff --git a/dist/beautylog.classes.js b/dist/beautylog.classes.js
index f2c86f8..b4527f0 100644
--- a/dist/beautylog.classes.js
+++ b/dist/beautylog.classes.js
@@ -5,8 +5,8 @@ var beautylog_classes_ora_1 = require("./beautylog.classes.ora");
exports.table = function (tableTypeArg, tableHeadArrayArg) {
return new beautylog_classes_table_1.Table(tableTypeArg, tableHeadArrayArg);
};
-exports.ora = function (textArg, colorArg) {
- return new beautylog_classes_ora_1.Ora(textArg, colorArg);
+exports.ora = function (textArg, colorArg, startArg) {
+ return new beautylog_classes_ora_1.Ora(textArg, colorArg, startArg);
};
-//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJlYXV0eWxvZy5jbGFzc2VzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLDRDQUE0Qzs7QUFFNUMsd0NBQW9CLDJCQUEyQixDQUFDLENBQUE7QUFDaEQsc0NBQWtCLHlCQUF5QixDQUFDLENBQUE7QUFFakMsYUFBSyxHQUFHLFVBQVMsWUFBbUIsRUFBQyxpQkFBMkI7SUFDdkUsTUFBTSxDQUFDLElBQUksK0JBQUssQ0FBQyxZQUFZLEVBQUMsaUJBQWlCLENBQUMsQ0FBQztBQUNyRCxDQUFDLENBQUE7QUFFVSxXQUFHLEdBQUcsVUFBUyxPQUFjLEVBQUMsUUFBZTtJQUNwRCxNQUFNLENBQUMsSUFBSSwyQkFBRyxDQUFDLE9BQU8sRU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FBUyxPQUFjLEVBQUMsUUFBZSxFQUFDLFFBQWlCO0lBQ3RFLE1BQU0sQ0FBQyxJQUFJLDJCQUFHLENBQUMsT0FBTyxFQUFDLFFBQVEsRUFBQyxRQUFRLENBQUMsQ0FBQztBQUM5QyxDQUFDLENBQUEiLCJmaWxlIjoiYmVhdXR5bG9nLmNsYXNzZXMuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLy8gPHJlZmVyZW5jZSBwYXRoPVwiLi90eXBpbmdzL21haW4uZC50c1wiIC8+XHJcblxyXG5pbXBvcnQge1RhYmxlfSBmcm9tIFwiLi9iZWF1dHlsb2cuY2xhc3Nlcy50YWJsZVwiO1xyXG5pbXBvcnQge09yYX0gZnJvbSBcIi4vYmVhdXR5bG9nLmNsYXNzZXMub3JhXCI7XHJcblxyXG5leHBvcnQgbGV0IHRhYmxlID0gZnVuY3Rpb24odGFibGVUeXBlQXJnOnN0cmluZyx0YWJsZUhlYWRBcnJheUFyZz86c3RyaW5nW10pe1xyXG4gICAgcmV0dXJuIG5ldyBUYWJsZSh0YWJsZVR5cGVBcmcsdGFibGVIZWFkQXJyYXlBcmcpO1xyXG59XHJcblxyXG5leHBvcnQgbGV0IG9yYSA9IGZ1bmN0aW9uKHRleHRBcmc6c3RyaW5nLGNvbG9yQXJnOnN0cmluZyxzdGFydEFyZz86Ym9vbGVhbil7XHJcbiAgICByZXR1cm4gbmV3IE9yYSh0ZXh0QXJnLGNvbG9yQXJnLHN0YXJ0QXJnKTtcclxufSJdfQ==
diff --git a/dist/beautylog.classes.ora.d.ts b/dist/beautylog.classes.ora.d.ts
index bdfa8ca..e817522 100644
--- a/dist/beautylog.classes.ora.d.ts
+++ b/dist/beautylog.classes.ora.d.ts
@@ -1,9 +1,12 @@
export declare class Ora {
private _oraObject;
state: string;
- constructor(textArg: string, colorArg: string);
+ constructor(textArg: string, colorArg: string, startArg?: boolean);
text(textArg: any): void;
+ start(): void;
end(): void;
endOk(textArg: any): void;
endError(textArg: any): void;
+ stop(): void;
+ log(logText: string, logType: string): void;
}
diff --git a/dist/beautylog.classes.ora.js b/dist/beautylog.classes.ora.js
index 93391e3..1215b5e 100644
--- a/dist/beautylog.classes.ora.js
+++ b/dist/beautylog.classes.ora.js
@@ -3,18 +3,23 @@
var plugins = require("./beautylog.plugins");
var log = require("./beautylog.log");
var Ora = (function () {
- function Ora(textArg, colorArg) {
+ function Ora(textArg, colorArg, startArg) {
+ if (startArg === void 0) { startArg = false; }
this._oraObject = plugins.ora({
spinner: "dots",
text: textArg,
color: colorArg
});
- this._oraObject.start();
+ startArg ? this._oraObject.start() : void (0);
}
Ora.prototype.text = function (textArg) {
this._oraObject.text = textArg;
};
;
+ Ora.prototype.start = function () {
+ this._oraObject.start();
+ };
+ ;
Ora.prototype.end = function () {
this._oraObject.stop();
this._oraObject.clear();
@@ -29,8 +34,17 @@ var Ora = (function () {
log.error(textArg);
};
;
+ Ora.prototype.stop = function () {
+ this.end();
+ };
+ // log methods that play nice with ora
+ Ora.prototype.log = function (logText, logType) {
+ this.stop();
+ log.log(logText, logType);
+ this.start();
+ };
return Ora;
}());
exports.Ora = Ora;
-//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJlYXV0eWxvZy5jbGFzc2VzLm9yYS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsNENBQTRDO0FBQzVDLElBQVksT0FBTyxXQUFNLHFCQUFxQixDQUFDLENBQUE7QUFDL0MsSUFBWSxHQUFHLFdBQU0saUJBQWlCLENBQUMsQ0FBQTtBQUV2QztJQUdJLGFBQVksT0FBYyxFQUFDLFFBQWU7UUFDdEMsSUFBSSxDQUFDLFVBQVUsR0FBRyxPQUFPLENBQUMsR0FBRyxDQUFDO1lBQzFCLE9BQU8sRUFBQyxNQUFNO1lBQ2QsSUFBSSxFQUFDLE9BQU87WUFDWixLQUFLLEVBQUMsUUFBUTtTQUNqQixDQUFDLENBQUM7UUFDS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3RydWN0b3IodGV4dEFyZzpzdHJpbmcsY29sb3JBcmc6c3RyaW5nKXtcclxuICAgICAgICB0aGlzLl9vcmFPYmplY3QgPSBwbHVnaW5zLm9yYSh7XHJcbiAgICAgICAgICAgIHNwaW5uZXI6XCJkb3RzXCIsXHJcbiAgICAgICAgICAgIHRleHQ6dGV4dEFyZyxcclxuICAgICAgICAgICAgY29sb3I6Y29sb3JBcmdcclxuICAgICAgICB9KTtcclxuICAgICAgICB0aGlzLl9vcmFPYmplY3Quc3RhcnQoKTtcclxuICAgIH1cclxuICAgIHRleHQodGV4dEFyZyl7XHJcbiAgICAgICAgdGhpcy5fb3JhT2JqZWN0LnRleHQgPSB0ZXh0QXJnO1xyXG4gICAgfTtcclxuICAgIGVuZCgpe1xyXG4gICAgICAgIHRoaXMuX29yYU9iamVjdC5zdG9wKCk7XHJcbiAgICAgICAgdGhpcy5fb3JhT2JqZWN0LmNsZWFyKCk7XHJcbiAgICB9XHJcbiAgICBlbmRPayh0ZXh0QXJnKXtcclxuICAgICAgICB0aGlzLmVuZCgpO1xyXG4gICAgICAgIGxvZy5vayh0ZXh0QXJnKTtcclxuICAgIH07XHJcbiAgICBlbmRFcnJvcih0ZXh0QXJnKXtcclxuICAgICAgICB0aGlzLmVuZCgpO1xyXG4gICAgICAgIGxvZy5lcnJvcih0ZXh0QXJnKTtcclxuICAgIH07XHJcbn0iXX0=
+//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJlYXV0eWxvZy5jbGFzc2VzLm9yYS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsNENBQTRDO0FBQzVDLElBQVksT0FBTyxXQUFNLHFCQUFxQixDQUFDLENBQUE7QUFDL0MsSUFBWSxHQUFHLFdBQU0saUJBQWlCLENBQUMsQ0FBQTtBQUV2QztJQUdJLGFBQVksT0FBYyxFQUFDLFFBQWUsRUFBQyxRQUF3QjtRQUF4Qix3QkFBd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hpcy5fb3JhT2JqZWN0LnRleHQgPSB0ZXh0QXJnO1xyXG4gICAgfTtcclxuICAgIFxyXG4gICAgc3RhcnQoKXtcclxuICAgICAgICB0aGlzLl9vcmFPYmplY3Quc3RhcnQoKTtcclxuICAgIH07XHJcbiAgICBlbmQoKXtcclxuICAgICAgICB0aGlzLl9vcmFPYmplY3Quc3RvcCgpO1xyXG4gICAgICAgIHRoaXMuX29yYU9iamVjdC5jbGVhcigpO1xyXG4gICAgfVxyXG4gICAgZW5kT2sodGV4dEFyZyl7XHJcbiAgICAgICAgdGhpcy5lbmQoKTtcclxuICAgICAgICBsb2cub2sodGV4dEFyZyk7XHJcbiAgICB9O1xyXG4gICAgZW5kRXJyb3IodGV4dEFyZyl7XHJcbiAgICAgICAgdGhpcy5lbmQoKTtcclxuICAgICAgICBsb2cuZXJyb3IodGV4dEFyZyk7XHJcbiAgICB9O1xyXG4gICAgc3RvcCgpeyAvLyBhbGlhcyBmb3IgZW5kXHJcbiAgICAgICAgdGhpcy5lbmQoKTtcclxuICAgIH1cclxuICAgIFxyXG4gICAgLy8gbG9nIG1ldGhvZHMgdGhhdCBwbGF5IG5pY2Ugd2l0aCBvcmFcclxuICAgIGxvZyhsb2dUZXh0OnN0cmluZyxsb2dUeXBlOnN0cmluZyl7XHJcbiAgICAgICAgdGhpcy5zdG9wKCk7XHJcbiAgICAgICAgbG9nLmxvZyhsb2dUZXh0LGxvZ1R5cGUpO1xyXG4gICAgICAgIHRoaXMuc3RhcnQoKTtcclxuICAgIH1cclxufSJdfQ==
diff --git a/dist/beautylog.plugins.d.ts b/dist/beautylog.plugins.d.ts
index c0bf002..c1829db 100644
--- a/dist/beautylog.plugins.d.ts
+++ b/dist/beautylog.plugins.d.ts
@@ -1,2 +1,8 @@
-declare var plugins: any;
-export = plugins;
+export declare let lodash: any;
+export declare let smartenv: any;
+export declare let q: any;
+export declare let cliTable: any;
+export declare let colors: any;
+export declare let clc: any;
+export declare let figlet: any;
+export declare let ora: any;
diff --git a/dist/beautylog.plugins.js b/dist/beautylog.plugins.js
index 44fdf2d..10a3b56 100644
--- a/dist/beautylog.plugins.js
+++ b/dist/beautylog.plugins.js
@@ -1,19 +1,12 @@
///
"use strict";
-var plugins = {
- lodash: require("lodash"),
- smartenv: require("smartenv"),
- q: require("q")
-};
-if (plugins.smartenv.getEnv().isNode) {
- plugins = plugins.lodash.assign(plugins, {
- cliTable: require("cli-table2"),
- colors: require("colors"),
- clc: require("cli-color"),
- figlet: require("figlet"),
- ora: require("ora")
- });
-}
-module.exports = plugins;
+exports.lodash = require("lodash");
+exports.smartenv = require("smartenv");
+exports.q = require("q");
+exports.cliTable = require("cli-table2");
+exports.colors = require("colors");
+exports.clc = require("cli-color");
+exports.figlet = require("figlet");
+exports.ora = require("ora");
-//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJlYXV0eWxvZy5wbHVnaW5zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLDRDQUE0Qzs7QUFFNUMsSUFBSSxPQUFPLEdBQU87SUFDZCxNQUFNLEVBQUUsT0FBTyxDQUFDLFFBQVEsQ0FBQztJQUN6QixRQUFRLEVBQUUsT0FBTyxDQUFDLFVBQVUsQ0FBQztJQUM3QixDQUFDLEVBQUUsT0FBTyxDQUFDLEdBQUcsQ0FBQztDQUNsQixDQUFDO0FBQ0YsRUFBRSxDQUFDLENBQUMsT0FBTyxDQUFDLFFBQVEsQ0FBQyxNQUFNLEVBQUUsQ0FBQyxNQUFNLENBQUMsQ0FBQSxDQUFDO0lBQ2xDLE9BQU8sR0FBRyxPQUFPLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQyxPQUFPLEVBQUM7UUFDcEMsUUFBUSxFQUFHLE9BQU8sQ0FBQyxZQUFZLENBQUM7UUFDaEMsTUFBTSxFQUFFLE9BQU8sQ0FBQyxRQUFRLENBQUM7UUFDekIsR0FBRyxFQUFFLE9BQU8sQ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7d0c1ea..9d1f082 100644
--- a/dist/index.d.ts
+++ b/dist/index.d.ts
@@ -7,7 +7,7 @@ export declare let figletSync: (textArg: string, optionsArg?: any) => boolean;
export declare let info: (logText: any) => void;
export declare let log: (logText?: string, logType?: string) => void;
export declare let ok: (logText: any) => void;
-export declare let ora: (textArg: string, colorArg: string) => Ora;
+export declare let ora: (textArg: string, colorArg: string, startArg?: boolean) => Ora;
export declare let success: (logText: any) => void;
export declare let table: (tableTypeArg: string, tableHeadArrayArg?: string[]) => Table;
export declare let warn: (logText: any) => void;
diff --git a/test/test.js b/test/test.js
index 1d144e7..2b42c9d 100644
--- a/test/test.js
+++ b/test/test.js
@@ -49,9 +49,10 @@ describe("beautylog", function () {
describe(".ora(text,color)", function () {
it("should display, update, and end a message", function (done) {
this.timeout(10000);
- var testOra = beautylog.ora("This is a test text", "green");
+ var testOra = beautylog.ora("This is a test text", "green", true);
setTimeout(function () {
testOra.text("updated text!");
+ testOra.log("an intermediate log message", "info");
setTimeout(function () {
testOra.endOk("Allright, ora works!");
done();
@@ -93,4 +94,4 @@ describe("beautylog", function () {
});
});
-//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLGdEQUFnRDtBQUNoRCxJQUFPLFNBQVMsV0FBVyxrQkFBa0IsQ0FBQyxDQUFDO0FBRS9DLFFBQVEsQ0FBQyxXQUFXLEVBQUM7SUFDakIsUUFBUSxDQUFDLHVCQUF1QixFQUFDO1FBQzdCLEVBQUUsQ0FBQyxzQkFBc0IsRUFBQztZQUN0QixTQUFTLENBQUMsR0FBRyxDQUFDLHVEQUF1RCxDQUFDLENBQUM7UUFDM0UsQ0FBQyxDQUFDLENBQUM7UUFDSCxFQUFFLENBQUMsdURBQXVELEVBQUM7WUFDdkQsU0FBUyxDQUFDLEdBQUcsQ0FBQyx1REFBdUQsQ0FBQyxDQUFDO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bWVzc2FnZVwiLGZ1bmN0aW9uKGRvbmUpe1xyXG4gICAgICAgICAgICB0aGlzLnRpbWVvdXQoMTAwMDApO1xyXG4gICAgICAgICAgICBsZXQgdGVzdE9yYSA9IGJlYXV0eWxvZy5vcmEoXCJUaGlzIGlzIGEgdGVzdCB0ZXh0XCIsXCJncmVlblwiKTtcclxuICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpe1xyXG4gICAgICAgICAgICAgICAgdGVzdE9yYS50ZXh0KFwidXBkYXRlZCB0ZXh0IVwiKTtcclxuICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXtcclxuICAgICAgICAgICAgICAgICAgICB0ZXN0T3JhLmVuZE9rKFwiQWxscmlnaHQsIG9yYSB3b3JrcyFcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgZG9uZSgpO1xyXG4gICAgICAgICAgICAgICAgfSwyMDAwKTtcclxuICAgICAgICAgICAgfSwyMDAwKVxyXG4gICAgICAgIH0pO1xyXG4gICAgICAgIGl0KFwic2hvdWxkIGRpc3BsYXkgYW4gZXJyb3IgbWVzc2FnZSB3aGVuIGVuZGVkIHdpdGggZXJyb3JcIixmdW5jdGlvbihkb25lKXtcclxuICAgICAgICAgICAgdGhpcy50aW1lb3V0KDEwMDAwKTtcclxuICAgICAgICAgICAgbGV0IHRlc3RPcmEgPSBiZWF1dHlsb2cub3JhKFwiVGhpcyBpcyBhbm90aGVyIHRlc3QgdGV4dFwiLFwiZ3JlZW5cIik7XHJcbiAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXtcclxuICAgICAgICAgICAgICAgIHRlc3RPcmEuZW5kRXJyb3IoXCJBbGxyaWdodCwgb3JhIGRpc3BsYXlzIGFuIGVycm9yIVwiKTtcclxuICAgICAgICAgICAgICAgIGRvbmUoKTtcclxuICAgICAgICAgICAgfSwyMDAwKVxyXG4gICAgICAgIH0pO1xyXG4gICAgfSk7XHJcbiAgICBkZXNjcmliZ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hpcyBpcyBhIHRlc3QgdGV4dFwiLFwiZ3JlZW5cIix0cnVlKTtcclxuICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpe1xyXG4gICAgICAgICAgICAgICAgdGVzdE9yYS50ZXh0KFwidXBkYXRlZCB0ZXh0IVwiKTtcclxuICAgICAgICAgICAgICAgIHRlc3RPcmEubG9nKFwiYW4gaW50ZXJtZWRpYXRlIGxvZyBtZXNzYWdlXCIsXCJpbmZvXCIpO1xyXG4gICAgICAgICAgICAgICAgXHJcbiAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7XHJcbiAgICAgICAgICAgICAgICAgICAgdGVzdE9yYS5lbmRPayhcIkFsbHJpZ2h0LCBvcmEgd29ya3MhXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgIGRvbmUoKTtcclxuICAgICAgICAgICAgICAgIH0sMjAwMCk7XHJcbiAgICAgICAgICAgIH0sMjAwMClcclxuICAgICAgICB9KTtcclxuICAgICAgICBpdChcInNob3VsZCBkaXNwbGF5IGFuIGVycm9yIG1lc3NhZ2Ugd2hlbiBlbmRlZCB3aXRoIGVycm9yXCIsZnVuY3Rpb24oZG9uZSl7XHJcbiAgICAgICAgICAgIHRoaXMudGltZW91dCgxMDAwMCk7XHJcbiAgICAgICAgICAgIGxldCB0ZXN0T3JhID0gYmVhdXR5bG9nLm9yYShcIlRoaXMgaXMgYW5vdGhlciB0ZXN0IHRleHRcIixcImdyZWVuXCIpO1xyXG4gICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7XHJcbiAgICAgICAgICAgICAgICB0ZXN0T3JhLmVuZEVycm9yKFwiQWxscmlnaHQsIG9yYSBkaXNwbGF5cyBhbiBlcnJvciFcIik7XHJcbiAgICAgICAgICAgICAgICBkb25lKCk7XHJcbiAgICAgICAgICAgIH0sMjAwMClcclxuICAgICAgICB9KTtcclxuICAgIH0pO1xyXG4gICAgZGVzY3JpYmUoXCIuc3VjY2Vz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CgpO1xyXG5cclxuICAgICAgICAgICAgICAgIHZhciB0ZXN0VGFibGUyID0gYmVhdXR5bG9nLnRhYmxlKFwiY3VzdG9tXCIsW1wiQ29sdW1uMVwiLnJlZCxcIkNvbHVtbjJcIi5ibHVlLFwiQ29sdW1uM1wiLmN5YW5dKTtcclxuICAgICAgICAgICAgICAgIHRlc3RUYWJsZTIucHVzaChbXCJIZXlcIixcInRoaXNcIixcIndvcmtzXCJdKTtcclxuICAgICAgICAgICAgICAgIHRlc3RUYWJsZTIucHJpbnQoKTtcclxuICAgICAgICAgICAgfSkoKTtcclxuICAgICAgICB9KTtcclxuICAgIH0pO1xyXG59KTtcclxuXHJcblxyXG4iXX0=
diff --git a/test/test.ts b/test/test.ts
index 73f6f3d..0a98146 100644
--- a/test/test.ts
+++ b/test/test.ts
@@ -49,9 +49,10 @@ describe("beautylog",function(){
describe(".ora(text,color)",function(){
it("should display, update, and end a message",function(done){
this.timeout(10000);
- let testOra = beautylog.ora("This is a test text","green");
+ let testOra = beautylog.ora("This is a test text","green",true);
setTimeout(function(){
testOra.text("updated text!");
+ testOra.log("an intermediate log message","info");
setTimeout(function(){
testOra.endOk("Allright, ora works!");
done();
diff --git a/ts/beautylog.classes.ora.ts b/ts/beautylog.classes.ora.ts
index 5099043..79b5f9d 100644
--- a/ts/beautylog.classes.ora.ts
+++ b/ts/beautylog.classes.ora.ts
@@ -5,17 +5,22 @@ import * as log from "./beautylog.log";
export class Ora {
private _oraObject;
state:string;
- constructor(textArg:string,colorArg:string){
+ constructor(textArg:string,colorArg:string,startArg:boolean = false){
this._oraObject = plugins.ora({
spinner:"dots",
text:textArg,
color:colorArg
});
- this._oraObject.start();
+
+ startArg ? this._oraObject.start() : void(0);
}
text(textArg){
this._oraObject.text = textArg;
};
+
+ start(){
+ this._oraObject.start();
+ };
end(){
this._oraObject.stop();
this._oraObject.clear();
@@ -28,4 +33,14 @@ export class Ora {
this.end();
log.error(textArg);
};
+ stop(){ // alias for end
+ this.end();
+ }
+
+ // log methods that play nice with ora
+ log(logText:string,logType:string){
+ this.stop();
+ log.log(logText,logType);
+ this.start();
+ }
}
\ No newline at end of file
diff --git a/ts/beautylog.classes.ts b/ts/beautylog.classes.ts
index b482e43..f54059b 100644
--- a/ts/beautylog.classes.ts
+++ b/ts/beautylog.classes.ts
@@ -7,6 +7,6 @@ export let table = function(tableTypeArg:string,tableHeadArrayArg?:string[]){
return new Table(tableTypeArg,tableHeadArrayArg);
}
-export let ora = function(textArg:string,colorArg:string){
- return new Ora(textArg,colorArg);
+export let ora = function(textArg:string,colorArg:string,startArg?:boolean){
+ return new Ora(textArg,colorArg,startArg);
}
\ No newline at end of file
diff --git a/ts/beautylog.plugins.ts b/ts/beautylog.plugins.ts
index 8e91558..e846bc7 100644
--- a/ts/beautylog.plugins.ts
+++ b/ts/beautylog.plugins.ts
@@ -1,17 +1,10 @@
///
-var plugins:any = {
- lodash: require("lodash"),
- smartenv: require("smartenv"),
- q: require("q")
-};
-if (plugins.smartenv.getEnv().isNode){
- plugins = plugins.lodash.assign(plugins,{
- cliTable: require("cli-table2"),
- colors: require("colors"),
- clc: require("cli-color"),
- figlet: require("figlet"),
- ora: require("ora")
- });
-}
-export = plugins;
\ No newline at end of file
+export let lodash = require("lodash");
+export let smartenv = require("smartenv");
+export let q = require("q")
+export let cliTable = require("cli-table2");
+export let colors = require("colors");
+export let clc = require("cli-color");
+export let figlet = require("figlet");
+export let ora = require("ora");