behnamghafary 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +30 -0
  2. package/index.js +122 -0
  3. package/package.json +29 -0
package/README.md ADDED
@@ -0,0 +1,30 @@
1
+ ### Hi there šŸ‘‹
2
+ #### I'm a Full-Stack Developer working in Goa, India.
3
+
4
+ #### šŸ’» T-Shaped Developer ([?](https://letslearnabout.net/blog/what-it-is-a-t-shaped-developer-and-why-you-should-be-one))
5
+ #### 🌱 I’m currently learning things about IOT and coding on Arduino
6
+ #### šŸ“« How to reach me: [Email](mailto:behnam.ghafary@gmail.com), [Linkedin](https://www.linkedin.com/in/behnamghafary/)
7
+ #### šŸ”­ My Latest Projects:
8
+ - [Enlightened Robot](https://enlightenedrobot.com/)
9
+ - [Ayandeyeman.ir](https://ayandeyeman.ir/)
10
+ #### šŸ˜„ FUN: You can find my personal info through NPM package by running
11
+ ```bash
12
+ npx behnamghafary
13
+ ```
14
+ (Reference: [HERE](https://github.com/Ridermansb/ridermansb))
15
+
16
+
17
+ <!--
18
+ **Behnamgh/behnamgh** is a ✨ _special_ ✨ repository because its `README.md` (this file) appears on your GitHub profile.
19
+
20
+ Here are some ideas to get you started:
21
+
22
+ - šŸ”­ I’m currently working on ...
23
+ - 🌱 I’m currently learning ...
24
+ - šŸ‘Æ I’m looking to collaborate on ...
25
+ - šŸ¤” I’m looking for help with ...
26
+ - šŸ’¬ Ask me about ...
27
+ - šŸ“« How to reach me: ...
28
+ - šŸ˜„ Pronouns: ...
29
+ - ⚔ Fun fact: ...
30
+ -->
package/index.js ADDED
@@ -0,0 +1,122 @@
1
+ #!/usr/bin/env node
2
+
3
+ "use strict";
4
+
5
+ import boxen from "boxen";
6
+ import chalk from "chalk";
7
+ import inquirer from "inquirer";
8
+ import clear from "clear";
9
+ import open from "open";
10
+ import ora from "ora";
11
+ import request from "request";
12
+ import cliSpinners from "cli-spinners";
13
+ import fs from "fs";
14
+ import path from "path";
15
+
16
+
17
+ clear();
18
+
19
+ const prompt = inquirer.createPromptModule();
20
+
21
+ // Questions after the card
22
+ const questions = [
23
+ {
24
+ type: "list",
25
+ name: "action",
26
+ message: "What you want to do?",
27
+ choices: [
28
+ {
29
+ name: `Send me an ${chalk.green.bold("email")}?`,
30
+ value: () => {
31
+ open("mailto:behnam.ghafary@gmail.com");
32
+ console.log("\nDone, see you soon.\n");
33
+ }
34
+ },
35
+ {
36
+ name: `Download my ${chalk.magentaBright.bold("Resume")}?`,
37
+ value: () => {
38
+ // cliSpinners.dots;
39
+ const loader = ora({
40
+ text: ' Downloading Resume',
41
+ spinner: cliSpinners.material,
42
+ }).start();
43
+ let pipe = request('https://bit.ly/3GZzwbA').pipe(fs.createWriteStream('./Behnam Ghafary-CV.pdf'));
44
+ pipe.on("finish", function () {
45
+ let downloadPath = path.join(process.cwd(), 'Behnam Ghafary-CV.pdf')
46
+ console.log(`\nResume Downloaded at ${downloadPath} \n`);
47
+ open(downloadPath)
48
+ loader.stop();
49
+ });
50
+ }
51
+ },
52
+ {
53
+ name: "Just quit.",
54
+ value: () => {
55
+ console.log("Good Bye!\n");
56
+ }
57
+ }
58
+ ]
59
+ }
60
+ ];
61
+
62
+ // Data for the card
63
+ const data = {
64
+ name: chalk.bold.green(" Behnam Ghafary"),
65
+
66
+ twitter: chalk.gray("https://twitter.com/") + chalk.cyan("behnam_ghafary"),
67
+ github: chalk.gray("https://github.com/") + chalk.green("behnamgh"),
68
+ linkedin: chalk.gray("https://linkedin.com/in/") + chalk.blue("behnamghafary"),
69
+ email: chalk.cyan("behnam.ghafary") + chalk.gray("@gmail.com"),
70
+ npx: chalk.red("npx") + " " + chalk.white("behnamghafary"),
71
+
72
+ labelTwitter: chalk.white.bold(" Twitter:"),
73
+ labelGitHub: chalk.white.bold(" GitHub:"),
74
+ labelLinkedIn: chalk.white.bold(" LinkedIn:"),
75
+ labelEmail: chalk.white.bold(" Email:"),
76
+ labelCard: chalk.white.bold(" Card:")
77
+ };
78
+
79
+ // Build the card
80
+ const me = boxen(
81
+ [
82
+ `${data.name}`,
83
+ ``,
84
+ `${data.labelTwitter} ${data.twitter}`,
85
+ `${data.labelGitHub} ${data.github}`,
86
+ `${data.labelLinkedIn} ${data.linkedin}`,
87
+ ``,
88
+ `${data.labelEmail} ${data.email}`,
89
+ ``,
90
+ `${data.labelCard} ${data.npx}`,
91
+ ``,
92
+ `${chalk.italic(
93
+ "I'm curious, enthusiastic and student most of the time."
94
+ )}`,
95
+ `${chalk.italic("The rest of the time I experiment with my code,")}`,
96
+ `${chalk.italic("to bring my ideas to life.")}`
97
+ ].join("\n"),
98
+ {
99
+ margin: 1,
100
+ float: 'center',
101
+ padding: 1,
102
+ borderStyle: "single",
103
+ borderColor: "green"
104
+ }
105
+ );
106
+
107
+ // Print the card
108
+ console.log(me);
109
+
110
+ // Optional tip to help users use the links
111
+ const tip = [
112
+ `Tip: Try ${chalk.cyanBright.bold(
113
+ "cmd/ctrl + click"
114
+ )} on the links above`,
115
+ '',
116
+ ].join("\n");
117
+
118
+ // Show the tip
119
+ console.log(tip);
120
+
121
+ // Ask the Inquirer questions.
122
+ prompt(questions).then(answer => answer.action());
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "behnamghafary",
3
+ "type": "module",
4
+ "version": "1.0.7",
5
+ "description": "Personla NPM card",
6
+ "main": "index.js",
7
+ "scripts": {
8
+ "test": "echo \"Error: no test specified\" && exit 1"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git@github-behnamgh:Behnamgh/behnamgh.git"
13
+ },
14
+ "author": "Behnam Ghafary <behnam.ghafary@gmail.com>",
15
+ "license": "MIT",
16
+ "dependencies": {
17
+ "boxen": "^6.2.1",
18
+ "chalk": "^4.1.2",
19
+ "clear": "^0.1.0",
20
+ "cli-spinners": "^2.6.1",
21
+ "inquirer": "^8.2.0",
22
+ "open": "^8.4.0",
23
+ "ora": "^6.0.1",
24
+ "request": "^2.88.2"
25
+ },
26
+ "bin": {
27
+ "behnamghafary": "index.js"
28
+ }
29
+ }