-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.js
executable file
Β·68 lines (61 loc) Β· 2.69 KB
/
build.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
const fs = require('fs')
const path = require('path')
async function build () {
const chalkModule = await import('chalk')
const chalk = chalkModule.default
const boxenModule = await import('boxen')
const boxen = boxenModule.default
const options = {
padding: 1,
margin: 1,
borderStyle: 'round'
}
const data = {
name: chalk.red(' Eric Newport'),
work1: chalk.blue('Software Engineer π¨βπ» Developer Mentor π¨βπ« Career Coach π§'),
work2: chalk.blue('and Wearer of Many Hats π© '),
mastodon: chalk.gray('https://mastodon.social/') + chalk.cyan('@kethinov'),
twitter: chalk.gray('https://twitter.com/') + chalk.cyan('kethinov'),
npm: chalk.gray('https://npmjs.com/') + chalk.cyan('~kethinov'),
github: chalk.gray('https://github.com/') + chalk.cyan('kethinov'),
linkedin: chalk.gray('https://linkedin.com/in/') + chalk.cyan('kethinov'),
wellfound: chalk.gray('https://wellfound.com/u/') + chalk.cyan('kethinov'),
web: chalk.cyan('http://kethinov.com'),
npx: chalk.white('npx') + ' ' + chalk.white('kethinov'),
labelWork: chalk.gray.bold(' '),
labelMastodon: chalk.gray.bold(' Mastodon:'),
labelTwitter: chalk.gray.bold(' Twitter:'),
labelnpm: chalk.gray.bold(' npm:'),
labelGitHub: chalk.gray.bold(' GitHub:'),
labelLinkedIn: chalk.gray.bold(' LinkedIn:'),
labelWellfound: chalk.gray.bold(' Wellfound:'),
labelWeb: chalk.gray.bold(' Web:'),
labelCard: chalk.white(' Card:')
}
const newline = '\n'
const heading = `${data.name}`
const working1 = `${data.labelWork} ${data.work1}`
const working2 = `${data.labelWork} ${data.work2}`
const mastodoning = `${data.labelMastodon} ${data.mastodon}`
const twittering = `${data.labelTwitter} ${data.twitter}`
const npm = `${data.labelnpm} ${data.npm}`
const githubing = `${data.labelGitHub} ${data.github}`
const linkedining = `${data.labelLinkedIn} ${data.linkedin}`
const wellfoundng = `${data.labelWellfound} ${data.wellfound}`
const webing = `${data.labelWeb} ${data.web}`
const carding = `${data.labelCard} ${data.npx}`
const output = heading +
newline + newline +
working1 + newline +
working2 + newline + newline +
mastodoning + newline +
twittering + newline +
npm + newline +
githubing + newline +
linkedining + newline +
wellfoundng + newline +
webing + newline + newline +
carding
fs.writeFileSync(path.join(__dirname, 'bin/output'), chalk.green(boxen(output, options)))
}
build()