From bd0790fec6fe224c2e3fc323f76f1770da1eb442 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Sat, 21 Jan 2017 18:40:40 +0100 Subject: [PATCH] switch to beautycolor --- dist/beautylog.log.helpers.js | 45 +++++++++++++++-------------------- dist/beautylog.plugins.d.ts | 4 ++-- dist/beautylog.plugins.js | 6 ++--- dist/beautylog.register.d.ts | 4 ++++ dist/beautylog.register.js | 1 + package.json | 4 +++- test/test.js | 2 +- test/test.ts | 2 ++ ts/beautylog.log.helpers.ts | 43 ++++++++++++++------------------- ts/beautylog.plugins.ts | 4 ++-- ts/beautylog.register.ts | 4 ++++ 11 files changed, 59 insertions(+), 60 deletions(-) diff --git a/dist/beautylog.log.helpers.js b/dist/beautylog.log.helpers.js index 5851d38..1573fb0 100644 --- a/dist/beautylog.log.helpers.js +++ b/dist/beautylog.log.helpers.js @@ -22,52 +22,45 @@ exports.internalLog = function (logType = 'normal', logText = 'empty log') { break; } }; -let xC = { - black: 232, - blue: 39, - cyan: 87, - green: 112, - red: 196, - white: 231 -}; +let coloredString = plugins.beautycolor.coloredString; let localBl = { - dirPrefix: plugins.clc.bgXterm(xC.blue).xterm(xC.white).bold(' DIR ') + ' ', - errorPrefix: plugins.clc.bgXterm(xC.red)(' ') + plugins.clc.bgXterm(xC.black).xterm(xC.red).bold(' Error: ') + ' ', - infoPrefix: plugins.clc.bgXterm(198).xterm(231).bold(' INFO ') + ' ', - logPrefix: plugins.clc.bgXterm(xC.cyan)(' ') + plugins.clc.bgXterm(xC.black).xterm(xC.cyan).bold(' Log: ') + ' ', - okPrefix: plugins.clc.bgXterm(xC.green)(' ') + plugins.clc.bgXterm(xC.black).xterm(xC.green).bold(' OK! ') + ' ', - successPrefix: plugins.clc.bgXterm(xC.green)(' ') + plugins.clc.bgXterm(xC.black).xterm(xC.green).bold(' Success: ') + ' ', - warnPrefix: plugins.clc.bgYellow(' ') + plugins.clc.bgBlack.yellow.bold(' Warn: ') + ' ' + dirPrefix: coloredString(' DIR ', 'white', 'blue') + ' ', + errorPrefix: coloredString(' ', 'red', 'red') + coloredString(' Error: ', 'red', 'black') + ' ', + infoPrefix: coloredString(' INFO ', 'white', 'pink') + ' ', + logPrefix: coloredString(' ', 'white', 'cyan') + coloredString(' Log: ', 'cyan', 'black') + ' ', + okPrefix: coloredString(' ', 'green', 'green') + coloredString(' OK! ', 'green', 'black') + ' ', + successPrefix: coloredString(' ', 'green', 'green') + coloredString(' Success: ', 'green', 'black') + ' ', + warnPrefix: coloredString(' ', 'orange', 'orange') + coloredString(' Warn: ', 'orange', 'black') + ' ' }; exports.logNode = function (logType, logText) { try { switch (logType) { case 'dir': - logText = localBl.dirPrefix + plugins.clc.xterm(xC.blue)(logText); + logText = localBl.dirPrefix + coloredString(logText, 'blue'); break; case 'error': - logText = localBl.errorPrefix + plugins.clc.xterm(xC.red).bold(logText); + logText = localBl.errorPrefix + coloredString(logText, 'red'); break; case 'info': - logText = localBl.infoPrefix + plugins.clc.xterm(198)(logText); + logText = localBl.infoPrefix + coloredString(logText, 'pink'); break; case 'normal': - logText = localBl.logPrefix + plugins.clc.xterm(xC.cyan).bold(logText); + logText = localBl.logPrefix + coloredString(logText, 'cyan'); break; case 'ok': - logText = localBl.okPrefix + plugins.clc.bold(logText); + logText = localBl.okPrefix + logText; break; case 'success': - logText = localBl.successPrefix + plugins.clc.xterm(xC.green).bold(logText); + logText = localBl.successPrefix + coloredString(logText, 'green'); break; case 'warn': - logText = localBl.warnPrefix + plugins.clc.bold(logText); + logText = localBl.warnPrefix + coloredString(logText, 'orange'); break; case 'log': - logText = localBl.logPrefix + plugins.clc.blue.bold(logText); + logText = localBl.logPrefix + coloredString(logText, 'cyan'); break; default: - plugins.clc.blue.bold(logText); + coloredString(logText, 'blue'); console.log(('unknown logType for "' + logText + '"')); break; } @@ -83,7 +76,7 @@ exports.logNode = function (logType, logText) { let logBrowser = function (logText, logType) { switch (logType) { case 'dir': - logText = localBl.dirPrefix + plugins.clc.xterm(26)(logText); + logText = localBl.dirPrefix + coloredString(logText, 'blue'); break; case 'error': logText = localBl.errorPrefix + logText.red.bold; @@ -111,4 +104,4 @@ let logBrowser = function (logText, logType) { break; } }; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmVhdXR5bG9nLmxvZy5oZWxwZXJzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvYmVhdXR5bG9nLmxvZy5oZWxwZXJzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSwrQ0FBOEM7QUFDOUMsMkRBQW1EO0FBQ25ELHlEQUE4QztBQUU5Qzs7Ozs7R0FLRztBQUNRLFFBQUEsV0FBVyxHQUFHLFVBQVUsVUFBa0IsUUFBUSxFQUFFLFVBQWtCLFdBQVc7SUFDeEYsTUFBTSxDQUFDLENBQUMsT0FBTyxDQUFDLFFBQVEsQ0FBQyxNQUFNLEVBQUUsQ0FBQyxVQUFVLENBQUMsQ0FBQyxDQUFDO1FBQzNDLEtBQUssTUFBTTtZQUNQLGVBQU8sQ0FBQyxPQUFPLEVBQUUsT0FBTyxDQUFDLENBQUE7WUFDekIsNEJBQVMsQ0FBQyxPQUFPLEVBQUUsT0FBTyxDQUFDLENBQUE7WUFDM0IsS0FBSyxDQUFBO1FBQ1QsS0FBSyxTQUFTO1lBQ1YsVUFBVSxDQUFDLE9BQU8sRUFBRSxPQUFPLENBQUMsQ0FBQTtZQUM1QixLQUFLLENBQUE7UUFDVDtZQUNJLE9BQU8sQ0FBQyxHQUFHLENBQUMsMkVBQTJFLENBQUMsQ0FBQTtZQUN4RixLQUFLLENBQUE7SUFDYixDQUFDO0FBQ0wsQ0FBQyxDQUFBO0FBRUQsSUFBSSxFQUFFLEdBQUc7SUFDTCxLQUFLLEVBQUUsR0FBRztJQUNWLElBQUksRUFBRSxFQUFFO0lBQ1IsSUFBSSxFQUFFLEVBQUU7SUFDUixLQUFLLEVBQUUsR0FBRztJQUNWLE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SxDQUFDLElBQUksQ0FBQTtZQUMvQyxLQUFLLENBQUE7UUFDVCxLQUFLLElBQUk7WUFDTCxPQUFPLENBQUMsR0FBRyxDQUFDLFlBQVksR0FBRyxPQUFPLEVBQUUsbUNBQW1DLEVBQUUsZ0JBQWdCLENBQUMsQ0FBQTtZQUMxRixLQUFLLENBQUE7UUFDVCxLQUFLLFNBQVM7WUFDVixPQUFPLENBQUMsR0FBRyxDQUFDLGlCQUFpQixHQUFHLE9BQU8sRUFBRSxtQ0FBbUMsRUFBRSxnQkFBZ0IsQ0FBQyxDQUFBO1lBQy9GLEtBQUssQ0FBQTtRQUNULEtBQUssTUFBTTtZQUNQLE9BQU8sQ0FBQyxHQUFHLENBQUMsY0FBYyxHQUFHLE9BQU8sRUFBRSxtQ0FBbUMsRUFBRSxnQkFBZ0IsQ0FBQyxDQUFBO1lBQzVGLEtBQUssQ0FBQTtRQUNULEtBQUssS0FBSztZQUNOLE9BQU8sQ0FBQyxHQUFHLENBQUMsYUFBYSxHQUFHLE9BQU8sRUFBRSxrQ0FBa0MsRUFBRSxnQkFBZ0IsQ0FBQyxDQUFBO1lBQzFGLEtBQUssQ0FBQTtRQUNUO1lBQ0ksT0FBTyxDQUFDLEdBQUcsQ0FBQyx1QkFBdUIsR0FBRyxPQUFPLEdBQUcsR0FBRyxDQUFDLENBQUE7WUFDcEQsS0FBSyxDQUFBO0lBQ2IsQ0FBQztBQUNMLENBQUMsQ0FBQSJ9 \ No newline at end of file diff --git a/dist/beautylog.plugins.d.ts b/dist/beautylog.plugins.d.ts index bdb76f4..f3a9326 100644 --- a/dist/beautylog.plugins.d.ts +++ b/dist/beautylog.plugins.d.ts @@ -1,9 +1,9 @@ import 'typings-global'; +import * as beautycolor from 'beautycolor'; import * as lodash from 'lodash'; import * as smartenv from 'smartenv'; import * as q from 'smartq'; -import * as clc from 'cli-color'; declare let figlet: any; import * as loggly from 'loggly'; declare let ora: any; -export { lodash, smartenv, q, clc, figlet, loggly, ora }; +export { beautycolor, lodash, smartenv, q, figlet, loggly, ora }; diff --git a/dist/beautylog.plugins.js b/dist/beautylog.plugins.js index c09a195..bd3c0d2 100644 --- a/dist/beautylog.plugins.js +++ b/dist/beautylog.plugins.js @@ -1,17 +1,17 @@ "use strict"; require("typings-global"); +const beautycolor = require("beautycolor"); +exports.beautycolor = beautycolor; const lodash = require("lodash"); exports.lodash = lodash; const smartenv = require("smartenv"); exports.smartenv = smartenv; const q = require("smartq"); exports.q = q; -const clc = require("cli-color"); -exports.clc = clc; let figlet = require('figlet'); exports.figlet = figlet; const loggly = require("loggly"); exports.loggly = loggly; let ora = require('ora'); exports.ora = ora; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmVhdXR5bG9nLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9iZWF1dHlsb2cucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsMEJBQXdCO0FBRXhCLGlDQUFnQztBQVM1Qix3QkFBTTtBQVJWLHFDQUFvQztBQVNoQyw0QkFBUTtBQVJaLDRCQUEyQjtBQVN2QixjQUFDO0FBUkwsaUNBQWdDO0FBUzVCLGtCQUFHO0FBUlAsSUFBSSxNQUFNLEdBQUcsT0FBTyxDQUFDLFFBQVEsQ0FBQyxDQUFBO0FBUzFCLHdCQUFNO0FBUlYsaUNBQWdDO0FBUzVCLHdCQUFNO0FBUlYsSUFBSSxHQUFHLEdBQUcsT0FBTyxDQUFDLEtBQUssQ0FBQyxDQUFBO0FBU3BCLGtCQUFHIn0= \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmVhdXR5bG9nLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9iZWF1dHlsb2cucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsMEJBQXVCO0FBRXZCLDJDQUEwQztBQVN0QyxrQ0FBVztBQVJmLGlDQUFnQztBQVM1Qix3QkFBTTtBQVJWLHFDQUFvQztBQVNoQyw0QkFBUTtBQVJaLDRCQUEyQjtBQVN2QixjQUFDO0FBUkwsSUFBSSxNQUFNLEdBQUcsT0FBTyxDQUFDLFFBQVEsQ0FBQyxDQUFBO0FBUzFCLHdCQUFNO0FBUlYsaUNBQWdDO0FBUzVCLHdCQUFNO0FBUlYsSUFBSSxHQUFHLEdBQUcsT0FBTyxDQUFDLEtBQUssQ0FBQyxDQUFBO0FBU3BCLGtCQUFHIn0= \ No newline at end of file diff --git a/dist/beautylog.register.d.ts b/dist/beautylog.register.d.ts index e69de29..aaeb707 100644 --- a/dist/beautylog.register.d.ts +++ b/dist/beautylog.register.d.ts @@ -0,0 +1,4 @@ +/** + * registers a remote + */ +export declare let registerRemote: any; diff --git a/dist/beautylog.register.js b/dist/beautylog.register.js index 14b6098..1d912bd 100644 --- a/dist/beautylog.register.js +++ b/dist/beautylog.register.js @@ -1 +1,2 @@ +"use strict"; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmVhdXR5bG9nLnJlZ2lzdGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvYmVhdXR5bG9nLnJlZ2lzdGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ== \ No newline at end of file diff --git a/package.json b/package.json index d7b9f05..5468f5e 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "dependencies": { "@types/lodash": "4.x.x", "@types/loggly": "^1.1.30", - "cli-color": "^1.1.0", + "beautycolor": "^1.0.2", "figlet": "^1.2.0", "lodash": "^4.17.4", "loggly": "^1.1.1", @@ -44,6 +44,8 @@ }, "devDependencies": { "npmts-g": "^6.0.0", + "qenv": "^1.1.3", + "smartchai": "^1.0.1", "typings-test": "^1.0.3" } } diff --git a/test/test.js b/test/test.js index eaac4ea..2702dcf 100644 --- a/test/test.js +++ b/test/test.js @@ -85,4 +85,4 @@ describe('beautylog', function () { }); }); }); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLHdCQUFxQjtBQUNyQiwyQ0FBMkM7QUFFM0MsUUFBUSxDQUFDLFdBQVcsRUFBQztJQUNqQixRQUFRLENBQUMsZUFBZSxFQUFDO1FBQ3JCLEVBQUUsQ0FBQyxpQ0FBaUMsRUFBQztZQUNqQyxTQUFTLENBQUMsR0FBRyxDQUFDLHVEQUF1RCxDQUFDLENBQUE7UUFDMUUsQ0FBQyxDQUFDLENBQUE7SUFDTixDQUFDLENBQUMsQ0FBQTtJQUNGLFFBQVEsQ0FBQyxlQUFlLEVBQUM7UUFDckIsRUFBRSxDQUFDLGlDQUFpQyxFQUFDO1lBQ2pDLFNBQVMsQ0FBQyxHQUFHLENBQUMsdURBQXVELENBQUMsQ0FBQTtRQUMxRSxDQUFDLENBQUMsQ0FBQTtJQUNOLENBQUMsQ0FBQyxDQUFBO0lBQ0YsUUFBUSxDQUFDLGlCQUFpQixFQUFDO1FBQ3ZCLEVBQUUsQ0FBQyxrQ0FBa0MsRUFBQztZQUNsQyxTQUFTLENBQUMsS0FBSyxDQUFDLHlEQUF5RCxDQUFDLENBQUE7UUFDOUUsQ0FBQyxDQUFDLENBQUE7SUFDTixDQUFDLENBQUMsQ0FBQTtJQUNGLFFBQVEsQ0FBQyxTQUFTLEVBQUM7UUFDZixFQUFFLENBQUMsOENBQThDLEVBQUMsVUFBUyxJQUFJO1lBQzNELFNBQVMsQ0FBQyxNQUFNLENBQUMsUUFBUSxFQUFDLEVBQUMsSUFBSSxFQUFFLFdBQVcsRUFBQyxLQUFLLEVBQUUsUUFBUSxFQUFDLENBQ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xDQUFBO1FBQ2xGLENBQUMsQ0FBQyxDQUFBO0lBQ04sQ0FBQyxDQUFDLENBQUE7SUFDRixRQUFRLENBQUMsT0FBTyxFQUFDO1FBQ2IsRUFBRSxDQUFDLHNDQUFzQyxFQUFDO1lBQ3RDLFNBQVMsQ0FBQyxJQUFJLENBQUMsd0RBQXdELENBQUMsQ0FBQTtRQUM1RSxDQUFDLENBQUMsQ0FBQTtJQUNOLENBQUMsQ0FBQyxDQUFBO0FBQ04sQ0FBQyxDQUFDLENBQUEifQ== \ No newline at end of file diff --git a/test/test.ts b/test/test.ts index 4c57c2b..99a2e8a 100644 --- a/test/test.ts +++ b/test/test.ts @@ -1,6 +1,8 @@ import 'typings-test' import beautylog = require('../dist/index') +import * as qenv from 'qenv' + describe('beautylog',function(){ describe('.log(message)',function(){ it('should print a blue Dir message',function(){ diff --git a/ts/beautylog.log.helpers.ts b/ts/beautylog.log.helpers.ts index ec055b1..96d9273 100644 --- a/ts/beautylog.log.helpers.ts +++ b/ts/beautylog.log.helpers.ts @@ -23,54 +23,47 @@ export let internalLog = function (logType: string = 'normal', logText: string = } } -let xC = { - black: 232, - blue: 39, - cyan: 87, - green: 112, - red: 196, - white: 231 -} +let coloredString = plugins.beautycolor.coloredString let localBl = { - dirPrefix: plugins.clc.bgXterm(xC.blue).xterm(xC.white).bold(' DIR ') + ' ', - errorPrefix: plugins.clc.bgXterm(xC.red)(' ') + plugins.clc.bgXterm(xC.black).xterm(xC.red).bold(' Error: ') + ' ', - infoPrefix: plugins.clc.bgXterm(198).xterm(231).bold(' INFO ') + ' ', - logPrefix: plugins.clc.bgXterm(xC.cyan)(' ') + plugins.clc.bgXterm(xC.black).xterm(xC.cyan).bold(' Log: ') + ' ', - okPrefix: plugins.clc.bgXterm(xC.green)(' ') + plugins.clc.bgXterm(xC.black).xterm(xC.green).bold(' OK! ') + ' ', - successPrefix: plugins.clc.bgXterm(xC.green)(' ') + plugins.clc.bgXterm(xC.black).xterm(xC.green).bold(' Success: ') + ' ', - warnPrefix: plugins.clc.bgYellow(' ') + plugins.clc.bgBlack.yellow.bold(' Warn: ') + ' ' + dirPrefix: coloredString(' DIR ', 'white', 'blue') + ' ', + errorPrefix: coloredString(' ', 'red','red') + coloredString(' Error: ', 'red', 'black') + ' ', + infoPrefix: coloredString(' INFO ', 'white', 'pink') + ' ', + logPrefix: coloredString(' ', 'white', 'cyan') + coloredString(' Log: ', 'cyan', 'black') + ' ', + okPrefix: coloredString(' ', 'green', 'green') + coloredString(' OK! ', 'green', 'black') + ' ', + successPrefix: coloredString(' ', 'green', 'green') + coloredString(' Success: ', 'green', 'black') + ' ', + warnPrefix: coloredString(' ', 'orange', 'orange') + coloredString(' Warn: ', 'orange', 'black') + ' ' } export let logNode = function (logType: string, logText: string) { try { switch (logType) { case 'dir': - logText = localBl.dirPrefix + plugins.clc.xterm(xC.blue)(logText) + logText = localBl.dirPrefix + coloredString(logText, 'blue') break case 'error': - logText = localBl.errorPrefix + plugins.clc.xterm(xC.red).bold(logText) + logText = localBl.errorPrefix + coloredString(logText, 'red') break case 'info': - logText = localBl.infoPrefix + plugins.clc.xterm(198)(logText) + logText = localBl.infoPrefix + coloredString(logText, 'pink') break case 'normal': - logText = localBl.logPrefix + plugins.clc.xterm(xC.cyan).bold(logText) + logText = localBl.logPrefix + coloredString(logText, 'cyan') break case 'ok': - logText = localBl.okPrefix + plugins.clc.bold(logText) + logText = localBl.okPrefix + logText break case 'success': - logText = localBl.successPrefix + plugins.clc.xterm(xC.green).bold(logText) + logText = localBl.successPrefix + coloredString(logText, 'green') break case 'warn': - logText = localBl.warnPrefix + plugins.clc.bold(logText) + logText = localBl.warnPrefix + coloredString(logText, 'orange') break case 'log': - logText = localBl.logPrefix + plugins.clc.blue.bold(logText) + logText = localBl.logPrefix + coloredString(logText, 'cyan') break default: - plugins.clc.blue.bold(logText) + coloredString(logText, 'blue') console.log(('unknown logType for "' + logText + '"')) break } @@ -86,7 +79,7 @@ export let logNode = function (logType: string, logText: string) { let logBrowser = function (logText, logType) { switch (logType) { case 'dir': - logText = localBl.dirPrefix + plugins.clc.xterm(26)(logText) + logText = localBl.dirPrefix + coloredString(logText, 'blue') break case 'error': logText = localBl.errorPrefix + logText.red.bold diff --git a/ts/beautylog.plugins.ts b/ts/beautylog.plugins.ts index 13f74c8..0e062b6 100644 --- a/ts/beautylog.plugins.ts +++ b/ts/beautylog.plugins.ts @@ -1,18 +1,18 @@ import 'typings-global' +import * as beautycolor from 'beautycolor' import * as lodash from 'lodash' import * as smartenv from 'smartenv' import * as q from 'smartq' -import * as clc from 'cli-color' let figlet = require('figlet') import * as loggly from 'loggly' let ora = require('ora') export { + beautycolor, lodash, smartenv, q, - clc, figlet, loggly, ora diff --git a/ts/beautylog.register.ts b/ts/beautylog.register.ts index e69de29..dd9e3dc 100644 --- a/ts/beautylog.register.ts +++ b/ts/beautylog.register.ts @@ -0,0 +1,4 @@ +/** + * registers a remote + */ +export let registerRemote \ No newline at end of file