fix(core): update

This commit is contained in:
Philipp Kunz 2018-11-04 13:26:56 +01:00
parent ba7727dc55
commit 5dd07e34ed
7 changed files with 1 additions and 25262 deletions

9
package-lock.json generated
View File

@ -101,15 +101,6 @@
"@pushrocks/smartpromise": "^2.0.5"
}
},
"@pushrocks/qenv": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/@pushrocks/qenv/-/qenv-2.0.2.tgz",
"integrity": "sha512-DKYbGy2m0fDRCVp9vwtgx1vZfYfK0k36POplCGo0jJat/DmB51KOjZ3gkqRqNJnoRQrn/kFH8+Xrm7D6gOotoA==",
"dev": true,
"requires": {
"@pushrocks/smartfile": "^6.0.6"
}
},
"@pushrocks/smartdelay": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/@pushrocks/smartdelay/-/smartdelay-2.0.2.tgz",

View File

@ -29,7 +29,6 @@
"@pushrocks/consolecolor": "^2.0.1",
"@pushrocks/smartlog-interfaces": "^2.0.1",
"@pushrocks/smartpromise": "^2.0.5",
"@types/lodash": "^4.14.117",
"ora": "^3.0.0",
"smartenv": "^4.0.3"
},

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +0,0 @@
<head>
<script async src="browserified/index.js"></script>
</head>
<body>
</body>

View File

@ -1,4 +0,0 @@
var beautylog = require("./index.js");
console.log("*** start browser console test (Might look weird in OS console and travis log...) ***");
beautylog.log("hello");
console.log("*** end browser console test ***");

View File

@ -1,60 +0,0 @@
import plugins = require('./sl.destlocal.plugins');
export interface IFigletOptions {
font?: string;
color?: plugins.consolecolor.TColorName;
cb?;
}
const defaultOptions: IFigletOptions = {
font: 'Star Wars',
color: 'green',
cb() {}
};
export let figlet = (textArg: string, optionsArg?) => {
const done = plugins.smartpromise.defer();
const mergeOptions = plugins.lodash.cloneDeep(defaultOptions);
const options = plugins.lodash.assign(mergeOptions, optionsArg);
plugins.figlet(
textArg,
{
font: options.font,
horizontalLayout: 'default',
verticalLayout: 'default'
},
function(err, data: string) {
if (err) {
console.log('Something went wrong...');
console.dir(err);
return;
}
console.log(colorFiglet(data, options.color));
options.cb();
done.resolve();
}
);
return done.promise;
};
export let figletSync = (textArg: string, optionsArg?: IFigletOptions) => {
const mergeOptions = plugins.lodash.cloneDeep(defaultOptions);
const options = plugins.lodash.assign(mergeOptions, optionsArg);
const figletString: string = plugins.figlet.textSync(textArg, {
font: options.font,
horizontalLayout: 'default',
verticalLayout: 'default'
});
console.log(colorFiglet(figletString, options.color));
return true;
};
const colorFiglet = (figletStringArg, colorArg: plugins.consolecolor.TColorName) => {
const figletArray = figletStringArg.split('\n');
let figletStringCombined = '';
for (let figletRow of figletArray) {
figletRow = plugins.consolecolor.coloredString(figletRow, colorArg);
figletStringCombined = figletStringCombined + figletRow + '\n';
}
return figletStringCombined;
};

View File

@ -1,9 +1,7 @@
import * as consolecolor from '@pushrocks/consolecolor';
import * as lodash from 'lodash';
import * as smartenv from 'smartenv';
import * as smartlogInterfaces from '@pushrocks/smartlog-interfaces';
import * as smartpromise from '@pushrocks/smartpromise';
let figlet = require('figlet');
let ora = require('ora');
export { consolecolor, lodash, smartenv, smartlogInterfaces, smartpromise, figlet, ora };
export { consolecolor, smartenv, smartlogInterfaces, smartpromise, ora };