-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.js
More file actions
61 lines (52 loc) · 2.23 KB
/
Copy pathbuild.js
File metadata and controls
61 lines (52 loc) · 2.23 KB
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
'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 scheme = {
secondary: chalk.cyan,
light: chalk.white,
shade: chalk.gray,
};
const data = {
name: scheme.light('Zainal Abidin @zaiinhs'),
work: scheme.light('Software Engineer (Frontend)'),
twitter: `${scheme.shade('https://twitter.com/')}${scheme.secondary('zaiinhs')}`,
// twitter: scheme.shade('https://twitter.com/') + scheme.secondary('zaiinhs'),
npm: scheme.shade('https://npmjs.com/') + scheme.secondary('~zaiinhs'),
github: scheme.shade('https://github.com/') + scheme.secondary('zaiinhs'),
linkedin: scheme.shade('https://linkedin.com/in/') + scheme.secondary('zaiinhs'),
web: scheme.secondary('https://zaiinhs.vercel.app'),
npx: scheme.shade('npx ') + scheme.secondary('zaiinhs'),
labelWork: scheme.light.bold('Work:'),
labelTwitter: scheme.light.bold('Twitter:'),
labelnpm: scheme.light.bold('npm:'),
labelGitHub: scheme.light.bold('GitHub:'),
labelLinkedIn: scheme.light.bold('LinkedIn:'),
labelWeb: scheme.light.bold('Web:'),
labelCard: scheme.light.bold('Card:')
};
const newline = '\n'
const heading = `${data.name}`
const working = `${data.work}`
const twittering = `${data.labelTwitter} ${data.twitter}`
const npming = `${data.labelnpm} ${data.npm}`
const githubing = `${data.labelGitHub} ${data.github}`
const linkedining = `${data.labelLinkedIn} ${data.linkedin}`
const webing = `${data.labelWeb} ${data.web}`
const carding = `${data.labelCard} ${data.npx}`
const output = heading + newline + // data.name
working + newline + // data.work
newline + newline + // Blank line
webing + newline + // data.labelWeb + data.web
linkedining + newline + newline + // data.labelLinkedIn + data.linkedin
twittering + newline + // data.labelTwitter + data.twitter
githubing + newline + // data.labelGitHub + data.github
npming + newline + newline + // data.labelnpm + data.npm
carding // data.labelCard + data.npx
fs.writeFileSync(path.join(__dirname, 'bin/output'), boxen(output, options))