Skip to content
This repository has been archived by the owner on May 8, 2020. It is now read-only.

Commit

Permalink
fix(cli): Update banner to zeroth banner logo
Browse files Browse the repository at this point in the history
  • Loading branch information
zakhenry committed Nov 29, 2016
1 parent 5528d8e commit 9b89814
Showing 1 changed file with 40 additions and 27 deletions.
67 changes: 40 additions & 27 deletions src/common/util/banner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,23 @@ import * as chalk from 'chalk';
* @type {string}
*/
export const banner = `
/| |\\ _
/ / \\ \\ | |
/ / \\ \\ | | _______ _____
/ / \\ \\ | | |__ __| | ____|
\`.\`. _______ ,'.' | |___ _ _____ _ _ _ | | |___
\`.\`.-----,'.' | _ | | | | _ | | | | | | | | | | |
\`.\`..,',' | |_| | | | | |_| | | |_| | | | | | ___| |
\`._,' |_____| |_| |___| | |_____| |_| |_| |_____|
| |
| |
| |
|_|`;
0
00 00000
0000 00 0000
00000 0000 00000
0000 000000 0000
000 0 000 000
000 00 000 000
000 000000 00 000
000 000 Zeroth 000 000
000 00 000000 000
000 000 00 000
000 000 0 000
0000 000000 0000
00000 000 00000
0000 000 0000
00000 00
0`;

export function bannerBg(message: string = '$ Zeroth Runtime CLI', bgString: string): string {

Expand All @@ -35,20 +40,26 @@ export function bannerBg(message: string = '$ Zeroth Runtime CLI', bgString: str
shortMessage += "*".repeat(38 - shortMessage.length);

const template = `
********************************************************************************
**** /| ***** |\\ **** _ ********************************************************
*** / / ***** \\ \\ ** | | *******************************************************
** / / ******* \\ \\ * | | ************************* _______ _____ ***********
* / / ********* \\ \\ | | ************************* |__ __| | ____| ***********
* \`.\`. _______ ,'.' | |___ _ _____ _ _ _ | | ***|___ ***********
*** \`.\`.-----,'.' ** | _ | | | | _ | | | | | | | | | *******| | ***********
***** \`.\`..,',' **** | |_| | | | | |_| | | |_| | | | | | ****___| | ***********
******* \`._,' ****** |_____| |_| |___| | |_____| |_| |_| ** |_____| ***********
********* *********************** | | ***************************************
************************************ | | ***************************************
************************************ | | *${shortMessage}
************************************ |_| ***************************************
********************************************************************************
************************************** **************************************
********************************* 0 *********************************
****************************** 00 00000 *****************************
************************** 0000 00 0000 *************************
*********************** 00000 0000 00000 **********************
*********************** 0000 000000 0000 *********************
********************** 000 0 000 000 *********************
********************** 000 00 000 000 *********************
********************** 000 000000 00 000 *********************
********************** 000 000 Zeroth 000 000 *********************
********************** 000 00 000000 000 *********************
********************** 000 000 00 000 *********************
********************** 000 000 0 000 *********************
*********************** 0000 000000 0000 **********************
*********************** 00000 000 00000 **********************
************************** 0000 000 0000 *************************
****************************** 00000 00 *****************************
********************************** 0 ********************************
*************************************** *************************************
*******************************************************************************
${longMessage}`;

const minReplacementLength = template.match(/\*+/g)
Expand All @@ -57,7 +68,9 @@ ${longMessage}`;
bgString = bgString.repeat(minReplacementLength / bgString.length + 1);
}

return template.replace(/\*+/g, (match: string) => {
return template
.replace(/0/g, '\u2b21')
.replace(/\*+/g, (match: string) => {
const replacement: string = bgString.substr(0, match.length);

bgString = bgString.substr(match.length);
Expand Down

0 comments on commit 9b89814

Please sign in to comment.