-
Notifications
You must be signed in to change notification settings - Fork 13
/
portfolio.js
44 lines (41 loc) · 1.31 KB
/
portfolio.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
import inquirer from "inquirer";
import { getData } from "./utils/getData.js";
import { setConfig } from "./utils/setConfig.js";
import { setToken } from "./utils/setToken.js";
import { runBuild } from "./utils/runBuild.js";
import { deploy } from "./utils/deploy.js";
async function portfolio() {
console.log(
"\n" +
" █▀█ █▀█ █▀█ ▀█▀ █▀▀ █▀█ █░░ █ █▀█\n" +
" █▀▀ █▄█ █▀▄ ░█░ █▀░ █▄█ █▄▄ █ █▄█\n" +
"https://github.com/shaansubbaiah/Portfolio\n"
);
while (true) {
const choice = await inquirer.prompt({
type: "list",
name: "action",
message: "What would you like to do?",
choices: [
"Set Github Token",
"Set configuration options",
"Build Portfolio",
"Deploy to GitHub Pages",
"Exit",
],
});
if (choice.action === "Set Github Token") {
await setToken();
} else if (choice.action === "Set configuration options") {
await setConfig();
} else if (choice.action === "Build Portfolio") {
await getData();
await runBuild();
} else if (choice.action === "Deploy to GitHub Pages") {
await deploy();
} else {
process.exit(0);
}
}
}
portfolio();