implements .newLine(), closes #1
This commit is contained in:
parent
5b1e406aeb
commit
93b6ab03cd
1
dist/beautylog.log.d.ts
vendored
1
dist/beautylog.log.d.ts
vendored
@ -36,3 +36,4 @@ export declare let error: (logText: any) => void;
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export declare let dir: (logText: any) => void;
|
||||
export declare let newLine: (linesArg?: number) => void;
|
||||
|
2
dist/beautylog.log.helpers.js
vendored
2
dist/beautylog.log.helpers.js
vendored
File diff suppressed because one or more lines are too long
8
dist/beautylog.log.js
vendored
8
dist/beautylog.log.js
vendored
@ -51,5 +51,11 @@ exports.error = function (logText) {
|
||||
exports.dir = function (logText) {
|
||||
return beautylog_log_helpers_1.log(logText, 'dir');
|
||||
};
|
||||
exports.newLine = function (linesArg) {
|
||||
if (linesArg === void 0) { linesArg = 1; }
|
||||
for (var i = 0; i < linesArg; i++) {
|
||||
console.log("\n");
|
||||
}
|
||||
};
|
||||
|
||||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJlYXV0eWxvZy5sb2cudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sZ0JBQWdCLENBQUMsQ0FBQTtBQUV4QixzQ0FBa0IseUJBQXlCLENBQUMsQ0FBQTtBQUM1QyxzQ0FBa0IseUJBQXlCLENBQUM7QUFBcEMsMENBQW9DO0FBRTVDOzs7O0dBSUc7QUFDUSxZQUFJLEdBQUcsVUFBVSxPQUFPO0lBQy9CLE1BQU0sQ0FBQywyQkFBRyxDQUFDLE9BQU8sRUFBRSxNQUFNLENBQUMsQ0FBQztBQUNoQyxDQUFDLENBQUM7QUFFRjs7OztHQUlHO0FBQ1EsVUFBRSxHQUFHLFVBQVUsT0FBTztJQUM3QixNQUFNLENBQUMsMkJBQUcsQ0FBQyxPQUFPLEVBQUUsSUFBSSxDQUFDLENBQUM7QUFDOUIsQ0FBQyxDQUFDO0FBRUY7Ozs7R0FJRztB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mcgdG8gbG9nIGFzIGVycm9yXG4gKiBAcmV0dXJucyB7Ym9vbGVhbn1cbiAqL1xuZXhwb3J0IGxldCBzdWNjZXNzID0gKGxvZ1RleHQpID0+IHtcbiAgICByZXR1cm4gbG9nKGxvZ1RleHQsICdzdWNjZXNzJyk7XG59O1xuXG4vKipcbiAqIGxvZ3MgYSAnd2FybjonIG1lc3NhZ2UgdG8gY29uc29sZVxuICogQHBhcmFtIGxvZ1RleHQgc3RyaW5nIHRvIGxvZyBhcyBlcnJvclxuICogQHJldHVybnMge2Jvb2xlYW59XG4gKi9cbmV4cG9ydCBsZXQgd2FybiA9IChsb2dUZXh0KSA9PiB7XG4gICAgcmV0dXJuIGxvZyhsb2dUZXh0LCAnd2FybicpO1xufTtcblxuLyoqXG4gKiBsb2dzIGFuIGVycm9yIHRvIGNvbnNvbGVcbiAqIEBwYXJhbSBsb2dUZXh0XG4gKiBAcmV0dXJucyB7Ym9vbGVhbn1cbiAqL1xuZXhwb3J0IGxldCBlcnJvciA9IChsb2dUZXh0KSA9PiB7XG4gICAgcmV0dXJuIGxvZyhsb2dUZXh0LCAnZXJyb3InKTtcbn07XG5cbi8qKlxuICogbG9ncyBhbiBkaXJlY3RvcnkgdG8gY29uc29sZVxuICogQHBhcmFtIGxvZ1RleHRcbiAqIEByZXR1cm5zIHtib29sZWFufVxuICovXG5leHBvcnQgbGV0IGRpciA9IChsb2dUZXh0KSA9PiB7XG4gICAgcmV0dXJuIGxvZyhsb2dUZXh0LCAnZGlyJyk7XG59O1xuXG5leHBvcnQgbGV0IG5ld0xpbmUgPSAobGluZXNBcmc6bnVtYmVyID0gMSkgPT4ge1xuICAgIGZvcihsZXQgaSA9IDA7IGkgPCBsaW5lc0FyZztpKyspe1xuICAgICAgICBjb25zb2xlLmxvZyhcIlxcblwiKTtcbiAgICB9XG59Il19
|
||||
|
11
dist/index.d.ts
vendored
11
dist/index.d.ts
vendored
@ -1,12 +1,5 @@
|
||||
import "typings-global";
|
||||
export { Table } from "./beautylog.classes.table";
|
||||
export { Ora } from "./beautylog.classes.ora";
|
||||
export declare let dir: (logText: any) => void;
|
||||
export declare let error: (logText: any) => void;
|
||||
export declare let figlet: (textArg: string, optionsArg?: any) => any;
|
||||
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 success: (logText: any) => void;
|
||||
export declare let warn: (logText: any) => void;
|
||||
export { dir, error, info, log, ok, success, warn, newLine } from "./beautylog.log";
|
||||
export { figlet, figletSync } from "./beautylog.figlet";
|
||||
|
27
dist/index.js
vendored
27
dist/index.js
vendored
@ -1,19 +1,22 @@
|
||||
"use strict";
|
||||
require("typings-global");
|
||||
var BeautylogLog = require("./beautylog.log");
|
||||
var BeautylogFiglet = require("./beautylog.figlet");
|
||||
// export classes
|
||||
var beautylog_classes_table_1 = require("./beautylog.classes.table");
|
||||
exports.Table = beautylog_classes_table_1.Table;
|
||||
var beautylog_classes_ora_1 = require("./beautylog.classes.ora");
|
||||
exports.Ora = beautylog_classes_ora_1.Ora;
|
||||
exports.dir = BeautylogLog.dir;
|
||||
exports.error = BeautylogLog.error;
|
||||
exports.figlet = BeautylogFiglet.figlet;
|
||||
exports.figletSync = BeautylogFiglet.figletSync;
|
||||
exports.info = BeautylogLog.info;
|
||||
exports.log = BeautylogLog.log;
|
||||
exports.ok = BeautylogLog.ok;
|
||||
exports.success = BeautylogLog.success;
|
||||
exports.warn = BeautylogLog.warn;
|
||||
// export methods
|
||||
var beautylog_log_1 = require("./beautylog.log");
|
||||
exports.dir = beautylog_log_1.dir;
|
||||
exports.error = beautylog_log_1.error;
|
||||
exports.info = beautylog_log_1.info;
|
||||
exports.log = beautylog_log_1.log;
|
||||
exports.ok = beautylog_log_1.ok;
|
||||
exports.success = beautylog_log_1.success;
|
||||
exports.warn = beautylog_log_1.warn;
|
||||
exports.newLine = beautylog_log_1.newLine;
|
||||
var beautylog_figlet_1 = require("./beautylog.figlet");
|
||||
exports.figlet = beautylog_figlet_1.figlet;
|
||||
exports.figletSync = beautylog_figlet_1.figletSync;
|
||||
|
||||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxRQUFPLGdCQUFnQixDQUFDLENBQUE7QUFHeEIsSUFBWSxZQUFZLFdBQU0saUJBQWlCLENBQUMsQ0FBQTtBQUNoRCxJQUFZLGVBQWUsV0FBTSxvQkFDakMsQ0FBQyxDQURvRDtBQUdyRCx3Q0FBb0IsMkJBQTJCLENBQUM7QUFBeEMsZ0RBQXdDO0FBQ2hELHNDQUFrQix5QkFBeUIsQ0FBQztBQUFwQywwQ0FBb0M7QUFFakMsV0FBRyxHQUFJLFlBQVksQ0FBQyxHQUFHLENBQUM7QUFDeEIsYUFBSyxHQUFJLFlBQVksQ0FBQyxLQUFLLENBQUM7QUFDNUIsY0FBTSxHQUFJLGVBQWUsQ0FBQyxNQUFNLENBQUM7QUFDakMsa0JBQVUsR0FBSSxlQUFlLENBQUMsVUFBVSxDQUFDO0FBQ3pDLFlBQUksR0FBSSxZQUFZLENBQUMsSUFBSSxDQUFDO0FBQzFCLFdBQUcsR0FBSSxZQUFZLENBQUMsR0FBRyxDQUFDO0FBQ3hCLFVBQUUsR0FBSSxZQUFZLENBQUMsRUFBRSxDQUFDO0FBQ3RCLGVBQU8sR0FBSSxZQUFZLENBQUMsT0FBTyxDQUFDO0FBQ2hDLFlBQUksR0FBSSxZQUFZLENBQUMsSUFBSSxDQUFDIiwiZmlsZSI6ImluZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFwidHlwaW5ncy1nbG9iYWxcIjtcblxuaW1wb3J0ICogYXMgcGx1Z2lucyBmcm9tIFwiLi9iZWF1dHlsb2cucGx1Z2luc1wiO1xuaW1wb3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kFBMkIsQ0FBQztBQUF4QyxnREFBd0M7QUFDaEQsc0NBQWtCLHlCQUF5QixDQUFDO0FBQXBDLDBDQUFvQztBQUU1QyxpQkFBaUI7QUFDakIsOEJBQXlELGlCQUFpQixDQUFDO0FBQW5FLGtDQUFHO0FBQUMsc0NBQUs7QUFBQyxvQ0FBSTtBQUFDLGtDQUFHO0FBQUMsZ0NBQUU7QUFBQywwQ0FBTztBQUFDLG9DQUFJO0FBQUMsMENBQWdDO0FBQzNFLGlDQUFnQyxvQkFBb0IsQ0FBQztBQUE3QywyQ0FBTTtBQUFDLG1EQUFxQyIsImZpbGUiOiJpbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBcInR5cGluZ3MtZ2xvYmFsXCI7XG5cbmltcG9ydCAqIGFzIHBsdWdpbnMgZnJvbSBcIi4vYmVhdXR5bG9nLnBsdWdpbnNcIjtcbmltcG9ydCAqIGFzIEJlYXV0eWxvZ0NvbnNvbGUgZnJvbSBcIi4vYmVhdXR5bG9nLmNvbnNvbGVcIjtcblxuLy8gZXhwb3J0IGNsYXNzZXNcbmV4cG9ydCB7VGFibGV9IGZyb20gXCIuL2JlYXV0eWxvZy5jbGFzc2VzLnRhYmxlXCI7XG5leHBvcnQge09yYX0gZnJvbSBcIi4vYmVhdXR5bG9nLmNsYXNzZXMub3JhXCI7XG5cbi8vIGV4cG9ydCBtZXRob2RzXG5leHBvcnQge2RpcixlcnJvcixpbmZvLGxvZyxvayxzdWNjZXNzLHdhcm4sbmV3TGluZX0gZnJvbSBcIi4vYmVhdXR5bG9nLmxvZ1wiO1xuZXhwb3J0IHtmaWdsZXQsZmlnbGV0U3luY30gZnJvbSBcIi4vYmVhdXR5bG9nLmZpZ2xldFwiIl19
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
||||
import "typings-test";
|
||||
import beautylog = require('../dist/index.js');
|
||||
import beautylog = require('../dist/index');
|
||||
|
||||
describe("beautylog",function(){
|
||||
describe(".log(message,logtype)",function(){
|
||||
@ -46,6 +46,11 @@ describe("beautylog",function(){
|
||||
beautylog.ok('beautylog.ok(), with normal logText, without logType');
|
||||
});
|
||||
});
|
||||
describe(".newLine(number)",function(){
|
||||
it("create specified amount of new lines",function(){
|
||||
beautylog.newLine(1);
|
||||
});
|
||||
});
|
||||
describe(".ora(text,color)",function(){
|
||||
it("should display, update, and end a message",function(done){
|
||||
this.timeout(10000);
|
||||
|
@ -3,7 +3,7 @@ import "typings-global";
|
||||
import * as plugins from "./beautylog.plugins";
|
||||
import {beautyConsole} from "./beautylog.console";
|
||||
|
||||
var localBl = {
|
||||
let localBl = {
|
||||
dirPrefix: plugins.clc.bgXterm(39).xterm(231).bold(' DIR ') + ' ',
|
||||
errorPrefix: ' Error: '.bgRed.white.bold + ' ',
|
||||
infoPrefix: plugins.clc.bgXterm(198).xterm(231).bold(' INFO ') + ' ',
|
||||
|
@ -8,7 +8,7 @@ export {log} from "./beautylog.log.helpers";
|
||||
* @param logText
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export let info = function (logText) {
|
||||
export let info = (logText) => {
|
||||
return log(logText, 'info');
|
||||
};
|
||||
|
||||
@ -17,7 +17,7 @@ export let info = function (logText) {
|
||||
* @param logText
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export let ok = function (logText) {
|
||||
export let ok = (logText) => {
|
||||
return log(logText, 'ok');
|
||||
};
|
||||
|
||||
@ -26,7 +26,7 @@ export let ok = function (logText) {
|
||||
* @param logText string to log as error
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export let success = function (logText) {
|
||||
export let success = (logText) => {
|
||||
return log(logText, 'success');
|
||||
};
|
||||
|
||||
@ -35,7 +35,7 @@ export let success = function (logText) {
|
||||
* @param logText string to log as error
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export let warn = function (logText) {
|
||||
export let warn = (logText) => {
|
||||
return log(logText, 'warn');
|
||||
};
|
||||
|
||||
@ -44,7 +44,7 @@ export let warn = function (logText) {
|
||||
* @param logText
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export let error = function (logText) {
|
||||
export let error = (logText) => {
|
||||
return log(logText, 'error');
|
||||
};
|
||||
|
||||
@ -53,6 +53,12 @@ export let error = function (logText) {
|
||||
* @param logText
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export let dir = function (logText) {
|
||||
export let dir = (logText) => {
|
||||
return log(logText, 'dir');
|
||||
};
|
||||
};
|
||||
|
||||
export let newLine = (linesArg:number = 1) => {
|
||||
for(let i = 0; i < linesArg;i++){
|
||||
console.log("\n");
|
||||
}
|
||||
}
|
15
ts/index.ts
15
ts/index.ts
@ -1,19 +1,12 @@
|
||||
import "typings-global";
|
||||
|
||||
import * as plugins from "./beautylog.plugins";
|
||||
import * as BeautylogLog from "./beautylog.log";
|
||||
import * as BeautylogFiglet from "./beautylog.figlet"
|
||||
import * as BeautylogConsole from "./beautylog.console";
|
||||
|
||||
// export classes
|
||||
export {Table} from "./beautylog.classes.table";
|
||||
export {Ora} from "./beautylog.classes.ora";
|
||||
|
||||
export let dir = BeautylogLog.dir;
|
||||
export let error = BeautylogLog.error;
|
||||
export let figlet = BeautylogFiglet.figlet;
|
||||
export let figletSync = BeautylogFiglet.figletSync;
|
||||
export let info = BeautylogLog.info;
|
||||
export let log = BeautylogLog.log;
|
||||
export let ok = BeautylogLog.ok;
|
||||
export let success = BeautylogLog.success;
|
||||
export let warn = BeautylogLog.warn;
|
||||
// export methods
|
||||
export {dir,error,info,log,ok,success,warn,newLine} from "./beautylog.log";
|
||||
export {figlet,figletSync} from "./beautylog.figlet"
|
Loading…
Reference in New Issue
Block a user