2016-02-23 13:34:40 +00:00
|
|
|
/// <reference path="./typings/main.d.ts" />
|
2016-04-04 20:36:54 +00:00
|
|
|
"use strict";
|
2016-02-23 14:40:18 +00:00
|
|
|
exports.log = require("./beautylog.node.log");
|
2016-02-23 13:34:40 +00:00
|
|
|
exports.table = require("./beautylog.node.table");
|
2016-04-04 20:17:56 +00:00
|
|
|
//handle figlet
|
2016-02-23 13:34:40 +00:00
|
|
|
var figletModule = require("./beautylog.node.figlet");
|
|
|
|
exports.figlet = figletModule.figlet;
|
|
|
|
exports.figletSync = figletModule.figletSync;
|
|
|
|
/**
|
|
|
|
* logs an directory to console
|
|
|
|
* @param logText
|
|
|
|
* @returns {boolean}
|
|
|
|
*/
|
|
|
|
exports.dir = function (logText) {
|
2016-02-23 14:40:18 +00:00
|
|
|
return exports.log(logText, 'dir');
|
2016-02-23 13:34:40 +00:00
|
|
|
};
|
|
|
|
/**
|
|
|
|
* logs an error to console
|
|
|
|
* @param logText
|
|
|
|
* @returns {boolean}
|
|
|
|
*/
|
|
|
|
exports.error = function (logText) {
|
2016-02-23 14:40:18 +00:00
|
|
|
return exports.log(logText, 'error');
|
2016-02-23 13:34:40 +00:00
|
|
|
};
|
|
|
|
/**
|
|
|
|
* logs an info to console
|
|
|
|
* @param logText
|
|
|
|
* @returns {boolean}
|
|
|
|
*/
|
|
|
|
exports.info = function (logText) {
|
2016-02-23 14:40:18 +00:00
|
|
|
return exports.log(logText, 'info');
|
2016-02-23 13:34:40 +00:00
|
|
|
};
|
|
|
|
/**
|
|
|
|
* logs an 'OK!' message to console
|
|
|
|
* @param logText
|
|
|
|
* @returns {boolean}
|
|
|
|
*/
|
|
|
|
exports.ok = function (logText) {
|
2016-02-23 14:40:18 +00:00
|
|
|
return exports.log(logText, 'ok');
|
2016-02-23 13:34:40 +00:00
|
|
|
};
|
|
|
|
/**
|
|
|
|
* logs a success to console
|
|
|
|
* @param logText string to log as error
|
|
|
|
* @returns {boolean}
|
|
|
|
*/
|
|
|
|
exports.success = function (logText) {
|
2016-02-23 14:40:18 +00:00
|
|
|
return exports.log(logText, 'success');
|
2016-02-23 13:34:40 +00:00
|
|
|
};
|
|
|
|
/**
|
|
|
|
* logs a 'warn:' message to console
|
|
|
|
* @param logText string to log as error
|
|
|
|
* @returns {boolean}
|
|
|
|
*/
|
|
|
|
exports.warn = function (logText) {
|
2016-02-23 14:40:18 +00:00
|
|
|
return exports.log(logText, 'warn');
|
2016-02-23 13:34:40 +00:00
|
|
|
};
|
|
|
|
|
2016-05-01 23:41:21 +00:00
|
|
|
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJlYXV0eWxvZy5ub2RlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLDRDQUE0Qzs7QUFFOUIsV0FBRyxXQUFXLHNCQUFzQixDQUFDLENBQUM7QUFDdEMsYUFBSyxXQUFXLHdCQUF3QixDQUFDLENBQUM7QUFFeEQsZUFBZTtBQUNmLElBQU8sWUFBWSxXQUFXLHlCQUF5QixDQUFDLENBQUM7QUFDOUMsY0FBTSxHQUFHLFlBQVksQ0FBQyxNQUFNLENBQUM7QUFDN0Isa0JBQVUsR0FBRyxZQUFZLENBQUMsVUFBVSxDQUFDO0FBQ2hEOzs7O0dBSUc7QUFDUSxXQUFHLEdBQUcsVUFBUyxPQUFPO0lBQzdCLE1BQU0sQ0FBQyxXQUFHLENBQUMsT0FBTyxFQUFFLEtBQUssQ0FBQyxDQUFDO0FBQy9CLENBQUMsQ0FBQztBQUdGOzs7O0dBSUc7QUFDUSxhQUFLLEdBQUcsVUFBUyxPQUFPO0lBQy9CLE1BQU0sQ0FBQyxXQUFHLENBQUMsT0FBTyxFQUFFLE9BQU8sQ0FBQyxDQUFDO0FBQ2pDLENBQUMsQ0FBQztBQUVGOzs7O0dBSUc7QUFDUSxZQUFJLEdBQUcsVUFBUyxPQUFPO0lBQzlCLE1BQU0sQ0FBQyxXQUFHLENBQU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