1
0
Fork 0
mirror of https://github.com/dilllxd/gitfolio.git synced 2024-08-14 22:28:09 +00:00
gitfolio/update.js

33 lines
785 B
JavaScript
Raw Normal View History

2019-12-11 17:10:27 +00:00
const { getConfig } = require("./utils");
const { updateHTML } = require("./populate");
2019-12-11 17:10:27 +00:00
async function updateCommand() {
const data = await getConfig();
var username = data[0].username;
2019-12-11 17:10:27 +00:00
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,
codepen: data[0].codepen,
dev: data[0].dev,
dribbble: data[0].dribbble,
email: data[0].email,
instagram: data[0].instagram,
2019-12-15 13:15:08 +00:00
reddit: data[0].reddit,
2019-12-14 16:16:09 +00:00
telegram: data[0].telegram,
twitter: data[0].twitter
};
updateHTML(username, opts);
}
module.exports = {
updateCommand
2019-12-11 17:10:27 +00:00
};