-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
54 lines (35 loc) · 1.09 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#! /usr/bin/env node
const cfonts = require('cfonts');
const boxen = require('boxen');
const chalk = require('chalk');
const data = require('./myData.js');
const asciiArt = require('./asciiArt');
const showName = name => {
const bigName = cfonts.render(name, {
colors: ['white', 'yellow']
});
return bigName.string;
};
const showAsciiArt = () => asciiArt;
const showLocation = () => `🌆 ${data.location} \n`;
const showWebSite = () => `🕸 ${data.siteUrl}\n`;
const showJobDescription = () => `💻 ${data.jobDescription} \n`;
const showDescription = () => `${data.description} \n`;
const showLinks = () =>
data.userLinks
.map(link => chalk`{gray ${link.label}:} {yellow ${link.url}}\n`)
.join('');
showCommand = () => chalk`{yellow $} {green npx ${data.packageName}}\n`;
const displayAll = () => `
${showAsciiArt()}
${showName(`${data.name.first} ${data.name.last}`)}
${showWebSite()}
${showJobDescription()}
${showLocation()}
${showDescription()}
${showLinks()}
${showCommand()}
`;
console.log(
boxen(displayAll(), { padding: 1, margin: 1, borderStyle: 'round' })
);