update exports of main module to work better with ES6 syntax

This commit is contained in:
LosslessBot 2016-05-03 22:42:28 +02:00
parent 011de8362b
commit a70a96edfd
5 changed files with 33 additions and 65 deletions

File diff suppressed because one or more lines are too long

23
dist/index.d.ts vendored
View File

@ -1,16 +1,13 @@
import * as classes from "./beautylog.classes";
declare let beautylog: {
log: (logText?: string, logType?: string) => void;
info: (logText: any) => void;
ok: (logText: any) => void;
success: (logText: any) => void;
warn: (logText: any) => void;
error: (logText: any) => void;
dir: (logText: any) => void;
figlet: (textArg: string, optionsArg?: any) => any;
figletSync: (textArg: string, optionsArg?: any) => boolean;
table: {
export declare let log: (logText?: string, logType?: string) => void;
export declare let info: (logText: any) => void;
export declare let ok: (logText: any) => void;
export declare let success: (logText: any) => void;
export declare let warn: (logText: any) => void;
export declare let error: (logText: any) => void;
export declare let dir: (logText: any) => void;
export declare let figlet: (textArg: string, optionsArg?: any) => any;
export declare let figletSync: (textArg: string, optionsArg?: any) => boolean;
export declare let table: {
new: (typeArg: string, tableHeadArrayArg?: any) => classes.ConsoleTable;
};
};
export = beautylog;

25
dist/index.js vendored
View File

@ -3,18 +3,15 @@
var BeautylogLog = require("./beautylog.log");
var BeautylogFiglet = require("./beautylog.figlet");
var BeautylogTable = require("./beautylog.table");
var beautylog = {
log: BeautylogLog.log,
info: BeautylogLog.info,
ok: BeautylogLog.ok,
success: BeautylogLog.success,
warn: BeautylogLog.warn,
error: BeautylogLog.error,
dir: BeautylogLog.dir,
figlet: BeautylogFiglet.figlet,
figletSync: BeautylogFiglet.figletSync,
table: BeautylogTable.table
};
module.exports = beautylog;
exports.log = BeautylogLog.log;
exports.info = BeautylogLog.info;
exports.ok = BeautylogLog.ok;
exports.success = BeautylogLog.success;
exports.warn = BeautylogLog.warn;
exports.error = BeautylogLog.error;
exports.dir = BeautylogLog.dir;
exports.figlet = BeautylogFiglet.figlet;
exports.figletSync = BeautylogFiglet.figletSync;
exports.table = BeautylogTable.table;
//# sourceMappingURL=data:application/json;charset=utf8;base64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Y2xhc3Nlc1wiO1xuaW1wb3J0ICogYXMgQmVhdXR5bG9nTG9nIGZyb20gXCIuL2JlYXV0eWxvZy5sb2dcIjtcbmltcG9ydCAqIGFzIEJlYXV0eWxvZ0ZpZ2xldCBmcm9tIFwiLi9iZWF1dHlsb2cuZmlnbGV0XCJcbmltcG9ydCAqIGFzIEJlYXV0eWxvZ1RhYmxlIGZyb20gXCIuL2JlYXV0eWxvZy50YWJsZVwiO1xuXG5leHBvcnQgbGV0IGxvZyA9ICBCZWF1dHlsb2dMb2cubG9nO1xuZXhwb3J0IGxldCBpbmZvID0gIEJlYXV0eWxvZ0xvZy5pbmZvO1xuZXhwb3J0IGxldCBvayA9ICBCZWF1dHlsb2dMb2cub2s7XG5leHBvcnQgbGV0IHN1Y2Nlc3MgPSAgQmVhdXR5bG9nTG9nLnN1Y2Nlc3M7XG5leHBvcnQgbGV0IHdhcm4gPSAgQmVhdXR5bG9nTG9nLndhcm47XG5leHBvcnQgbGV0IGVycm9yID0gIEJlYXV0eWxvZ0xvZy5lcnJvcjtcbmV4cG9ydCBsZXQgZGlyID0gIEJlYXV0eWxvZ0xvZy5kaXI7XG5leHBvcnQgbGV0IGZpZ2xldCA9ICBCZWF1dHlsb2dGaWdsZXQuZmlnbGV0O1xuZXhwb3J0IGxldCBmaWdsZXRTeW5jID0gIEJlYXV0eWxvZ0ZpZ2xldC5maWdsZXRTeW5jO1xuZXhwb3J0IGxldCB0YWJsZSA9ICBCZWF1dHlsb2dUYWJsZS50YWJsZVxuIl19

View File

@ -103,12 +103,4 @@ let logBrowser = function(logText,logType){
console.log('unknown logType for "' + logText + '"');
break;
}
};

View File

@ -6,31 +6,13 @@ import * as BeautylogLog from "./beautylog.log";
import * as BeautylogFiglet from "./beautylog.figlet"
import * as BeautylogTable from "./beautylog.table";
let beautylog = {
log: BeautylogLog.log,
info: BeautylogLog.info,
ok: BeautylogLog.ok,
success: BeautylogLog.success,
warn: BeautylogLog.warn,
error: BeautylogLog.error,
dir: BeautylogLog.dir,
figlet: BeautylogFiglet.figlet,
figletSync: BeautylogFiglet.figletSync,
table: BeautylogTable.table
};
/*switch(plugins.smartenv.getEnv().runtimeEnv) {
case "node":
beautylog = BeautylogNode;
break;
case "browser":
beautylog = BeautylogBrowser;
break;
default:
console.log("something is strange about the platform in which you try to use beautylog");
break;
}*/
export = beautylog;
export let log = BeautylogLog.log;
export let info = BeautylogLog.info;
export let ok = BeautylogLog.ok;
export let success = BeautylogLog.success;
export let warn = BeautylogLog.warn;
export let error = BeautylogLog.error;
export let dir = BeautylogLog.dir;
export let figlet = BeautylogFiglet.figlet;
export let figletSync = BeautylogFiglet.figletSync;
export let table = BeautylogTable.table