-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
99 lines (85 loc) · 2.72 KB
/
index.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
89
90
91
92
93
94
95
96
97
98
99
#!/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 do you want to do?",
choices: [
{
name: `Toss an ${chalk.reset("email")}?`,
value: () => {
open("mailto:[email protected]");
console.log("\nLooking forward to hearing your message and replying to you!\n");
}
},
{
name: "Exit",
value: () => {
console.log("🚀Good bye, have a nice day!\n");
}
}
]
}
];
const data = {
name: chalk.reset("Rafdy Amestira"),
work: chalk.reset('Business And Intergration Arch Analyst'),
workplace: chalk.reset('Accenture'),
github: chalk.hex('#00AB9E')("https://github.com/arafdy"),
instagram: chalk.hex('#00AB9E')("https://www.instagram.com/a_rafdy/"),
website: chalk.hex('#00AB9E')("https://arafdy.github.io/rafdy"),
labelGitHub: chalk.hex('#9E9E9E').reset("🐱 GitHub :"),
labelWebsite: chalk.hex('#9E9E9E').reset("🌐 Website :"),
labelInstagram: chalk.hex('#9E9E9E').reset("📱 Instagram:"),
};
const me = boxen(
[
`${data.name}`,
``,
`${chalk.hex('#696969')('>')} ${data.work} ${chalk.hex('#696969')('@')} ${data.workplace}`,
``,
`${data.labelGitHub} ${data.github}`,
`${data.labelWebsite} ${data.website}`,
`${data.labelInstagram} ${data.instagram}`,
``,
`${chalk.reset(
"Well hello peole, Rafdy's here "
)}`,
`${chalk("I really love to build things in the terms of ")}`,
`${chalk.reset("electrical and software design! ")}`,
`${chalk.reset(
"I'm enjoying learn MERN development and Platform things"
)}`,
`${chalk.reset(
"Toss me an email if you want to collab!"
)}`
].join("\n"),
{
margin: 1,
float: 'center',
padding: 1,
borderStyle: "single",
borderColor: "black"
}
);
console.log(me);
// const tip = [
// `Tip: ${chalk.cyanBright.reset(
// "cmd/ctrl + click"
// )} on the links above to open them in your broswer.`,
// '',
// ].join("\n")
const tip = `Tip: ${chalk.cyanBright.reset(
"cmd/ctrl + click"
)} on the links above to open them in your broswer. 🛩`
console.log(tip);
prompt(questions).then(answer => answer.action());
// console.log(answer.action());