-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.js
executable file
·53 lines (46 loc) · 1.92 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
'use strict'
// Pull in our modules
const chalk = require('chalk')
const boxen = require('boxen')
const fs = require('fs')
const path = require('path')
// Define options for Boxen
const options = {
padding: 1,
margin: 1,
borderStyle: 'single'
}
// Text + chalk definitions
const data = {
name: chalk.white.bold(' Dhilip Kumar'),
work: chalk.hex('#be8d30')('Software Engineer') + chalk.white(' @ ') + chalk.hex('#f35325')('Mi') + chalk.hex('#81bc09')('cro') + chalk.hex('#07a6f0')('so') + chalk.hex('#ffba12')('ft'),
github: chalk.green('https://www.github.com/dhilipkmr'),
linkedin: chalk.cyan('https://www.linkedin.com/in/dhilipkmr'),
blog: chalk.hex('#adadad')(' https://www.dev.to/dhilipkmr'),
npm: chalk.red(' https://www.npmjs.com/~dhilipkmr'),
web: chalk.hex('#cbdc00')(' https://www.dhilipkmr.dev'),
labelWork: chalk.white.bold(' Work:'),
labelGitHub: chalk.white.bold(' GitHub:'),
labelLinkedIn: chalk.white.bold(' LinkedIn:'),
labelDev: chalk.white.bold(' Blogs:'),
labelNpm: chalk.white.bold(' Npm:'),
labelWeb: chalk.white.bold(' Website:')
}
// Actual strings we're going to output
const newline = '\n';
const heading = `${data.name}`;
const working = `${data.labelWork} ${data.work}`;
const githubing = `${data.labelGitHub} ${data.github}`;
const linkedining = `${data.labelLinkedIn} ${data.linkedin}`;
const devBlogging = `${data.labelDev} ${data.blog}`;
const npming = `${data.labelNpm} ${data.npm}`;
const webing = `${data.labelWeb} ${data.web}`;
const output = heading +
newline + newline +
working + newline +
webing + newline +
linkedining + newline +
githubing + newline +
devBlogging + newline +
npming + newline;
fs.writeFileSync(path.join(__dirname, 'bin/output'), chalk.green(boxen(output, options)))