Skip to content

Commit

Permalink
FEAT: ADDED PROMPT TO DOWNLOAD RESUME.
Browse files Browse the repository at this point in the history
  • Loading branch information
anmol098 committed Dec 5, 2020
1 parent 531e798 commit d439d24
Show file tree
Hide file tree
Showing 4 changed files with 395 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# Project exclude paths
/node_modules/
/node_modules/
/.idea/
.idea/
15 changes: 15 additions & 0 deletions card.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ const chalk = require("chalk");
const inquirer = require("inquirer");
const clear = require("clear");
const open = require("open");
const fs = require('fs');
const request = require('request');
const path = require('path');

clear();

Expand All @@ -25,6 +28,18 @@ const questions = [
console.log("\nDone, see you soon at inbox.\n");
}
},
{
name: `Download my ${chalk.magentaBright.bold("Resume")}?`,
value: () => {
let pipe = request('https://anmolsingh.me/api/resume').pipe(fs.createWriteStream('./anmol-resume.html'));
pipe.on("finish", function () {
let downloadPath = path.join(process.cwd(), 'anmol-resume.html')
console.log(`\nResume Downloaded at ${downloadPath} \n`);
open("./anmol-resume.html")

});
}
},
{
name: "Just quit.",
value: () => {
Expand Down
Loading

0 comments on commit d439d24

Please sign in to comment.