Skip to content

Commit 2f32e5d

Browse files
committed
🎊 Fix issue with ascii logo on small consoles, fixes #36
1 parent 31292af commit 2f32e5d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/accurapp-scripts/scripts/_utils.js

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ const log = {
2121
function noop() {}
2222

2323
function coloredBanner(text, colors = ['blue', 'red']) {
24+
// If the console is small, we show only the logo
25+
if (process.stdout.columns < 125 && text.includes(' accurapp')) {
26+
text = text.slice(0, -' accurapp'.length)
27+
}
28+
2429
const bannerText = text.replace(/\|/g, 'l') // In BigMoney font, 'l' (lowercase L) are much nicer than '|' (pipes)
2530
const bannerColors = { '$': colors[0], '_': colors[1], '|': colors[1], '\\': colors[1], '/': colors[1] }
2631
const banner = figlet.textSync(bannerText, { font: 'Big Money-nw' })

0 commit comments

Comments
 (0)