-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.js
executable file
·56 lines (48 loc) · 1.95 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
'use strict'
const chalk = require('chalk')
const boxen = require('boxen')
const fs = require('fs')
const path = require('path')
const options = {
padding: 1,
margin: 1,
borderStyle: 'round'
}
const data = {
name: chalk.white(' Abdullayev Javid'),
handle: chalk.white('javid_abd'),
work: chalk.white('Software engineer at Finna'),
twitter: chalk.gray('https://twitter.com/') + chalk.cyan('javid_abd'),
github: chalk.gray('https://github.com/') + chalk.green('javid-abd'),
linkedin: chalk.gray('https://linkedin.com/in/') + chalk.blue('javidabd'),
web: chalk.cyan('https://javid.dev'),
hobbies: chalk.magentaBright('Travelling, Tech and Comics'),
npx: chalk.red('npx') + ' ' + chalk.white('javidabd'),
labelWork: chalk.white.bold(' Work:'),
labelTwitter: chalk.white.bold(' Twitter:'),
labelnpm: chalk.white.bold(' npm:'),
labelGitHub: chalk.white.bold(' GitHub:'),
labelLinkedIn: chalk.white.bold(' LinkedIn:'),
labelWeb: chalk.white.bold(' Web:'),
labelHobbies: chalk.white.bold(' Hobbies:'),
labelCard: chalk.white.bold(' Card:')
}
const newline = '\n'
const heading = `${data.name} / ${data.handle}`
const working = `${data.labelWork} ${data.work}`
const twittering = `${data.labelTwitter} ${data.twitter}`
const githubing = `${data.labelGitHub} ${data.github}`
const linkedining = `${data.labelLinkedIn} ${data.linkedin}`
const webing = `${data.labelWeb} ${data.web}`
const hobbies = `${data.labelHobbies} ${data.hobbies}`
const carding = `${data.labelCard} ${data.npx}`
const output = heading +
newline + newline +
working + newline +
twittering + newline +
githubing + newline +
linkedining + newline +
webing + newline +
hobbies + newline + newline +
carding
fs.writeFileSync(path.join(__dirname, 'bin/output'), chalk.green(boxen(output, options)))