dragadix
Version:
A flirty, powerful CLI experience built by Aditya đ
35 lines (30 loc) âĸ 1.03 kB
JavaScript
import chalk from "chalk";
import inquirer from "inquirer";
import open from "open";
import { config } from "../config.js";
export async function showResume() {
const resumeLink = config?.resumeLink;
if (!resumeLink) {
console.log(chalk.red("â Resume link not defined in config.js"));
return;
}
const answer = await inquirer.prompt([
{
type: "list",
name: "resume",
message: chalk.cyan("What do you wanna do with my sexy resume? đ"),
choices: [
{ name: "đ Open Resume in Browser", value: "open" },
{ name: "đĨ Download Resume (external link)", value: "download" },
{ name: "âŠī¸ Return to Main Menu", value: "return" }
]
}
]);
if (answer.resume === "open") {
await open(resumeLink);
console.log(chalk.green("â
Resume opened in browser"));
} else if (answer.resume === "download") {
console.log(chalk.gray("⨠Opening resume link in browser. Use your browser to save it manually."));
await open(resumeLink);
}
}