fix(core): update
This commit is contained in:
parent
ba7727dc55
commit
5dd07e34ed
9
package-lock.json
generated
9
package-lock.json
generated
@ -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",
|
||||
|
@ -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
@ -1,6 +0,0 @@
|
||||
<head>
|
||||
<script async src="browserified/index.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
@ -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 ***");
|
@ -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;
|
||||
};
|
@ -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 };
|
||||
|
Loading…
Reference in New Issue
Block a user