forked from imfunniee/gitfolio
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate.js
More file actions
28 lines (26 loc) · 673 Bytes
/
update.js
File metadata and controls
28 lines (26 loc) · 673 Bytes
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
const { getConfig } = require("./utils");
const { updateHTML } = require("./populate");
async function updateCommand() {
const data = await getConfig();
var username = data[0].username;
if (username == null) {
console.log(
"username not found in config.json, please run build command before using update"
);
return;
}
const opts = {
sort: data[0].sort,
order: data[0].order,
includeFork: data[0].includeFork,
types: data[0].types,
twitter: data[0].twitter,
linkedin: data[0].linkedin,
medium: data[0].medium,
dribbble: data[0].dribbble
};
updateHTML(username, opts);
}
module.exports = {
updateCommand
};