-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcard.js
88 lines (79 loc) · 2.37 KB
/
card.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/usr/bin/env node
'use strict'
const boxen = require("boxen");
const chalk = require("chalk");
const inquirer = require("inquirer");
const clear = require("clear");
const open = require("open");
clear();
const prompt = inquirer.createPromptModule();
const questions = [
{
type: "list",
name: "action",
message: "What you want to do?",
choices: [
{
name: `Send me an ${chalk.green.bold("email")}?`,
value: () => {
open("mailto:[email protected]");
console.log("\nDone, see you soon at inbox.\n");
}
},
{
name: "Just quit.",
value: () => {
console.log("Hasta la vista.\n");
}
}
]
}
];
const data = {
name: chalk.bold.green(" Tapesh Dua"),
email: chalk.green("[email protected]"),
github: chalk.gray("https://github.com/") + chalk.green("Tapesh-1308"),
linkedin: chalk.gray("https://linkedin.com/in/") + chalk.blue("tapesh-dua-b49872216"),
npx: chalk.red("npx") + " " + chalk.white("tapesh-dua"),
labelEmail: chalk.white.bold(" Email:"),
labelGitHub: chalk.white.bold(" GitHub:"),
labelLinkedIn: chalk.white.bold(" LinkedIn:"),
labelCard: chalk.white.bold(" Card:")
};
const me = boxen(
[
`${data.name}`,
``,
`${data.labelEmail} ${data.email}`,
`${data.labelGitHub} ${data.github}`,
`${data.labelLinkedIn} ${data.linkedin}`,
`${data.labelCard} ${data.npx}`,
``,
`${chalk.italic(
"Hi there! I am Tapesh, a Frontend Developer"
)}`,
`${chalk.italic("and DSA Problem-Solver from India, and have a")}`,
`${chalk.italic(
"expertise in creating beautiful, cool, and responsive"
)}`,
`${chalk.italic(
"web apps. Toss me an email if you want to collab!"
)}`
].join("\n"),
{
margin: 1,
float: 'center',
padding: 1,
borderStyle: "single",
borderColor: "green"
}
);
console.log(me);
const tip = [
`Tip: Try ${chalk.cyanBright.bold(
"cmd/ctrl + click"
)} on the links above`,
'',
].join("\n");
console.log(tip);
prompt(questions).then(answer => answer.action());