2019-05-23 09:57:23 +00:00
|
|
|
const {getConfig} = require('./utils');
|
2019-05-12 13:44:03 +00:00
|
|
|
const {updateHTML} = require('./populate');
|
|
|
|
|
2019-05-23 05:00:49 +00:00
|
|
|
async function updateCommand() {
|
|
|
|
const data = await getConfig();
|
2019-05-12 13:44:03 +00:00
|
|
|
var username = data[0].username;
|
2019-05-20 14:16:32 +00:00
|
|
|
var sort = data[0].sort;
|
|
|
|
var order = data[0].order;
|
|
|
|
var includeFork = data[0].includeFork;
|
|
|
|
if(username == null || sort == null || order == null || includeFork == null){
|
2019-05-12 13:44:03 +00:00
|
|
|
console.log("username not found in config.json, please run build command before using update");
|
|
|
|
return;
|
|
|
|
}
|
2019-05-20 14:16:32 +00:00
|
|
|
updateHTML(username, sort, order, includeFork);
|
2019-05-23 05:00:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = {
|
2019-05-23 09:57:23 +00:00
|
|
|
updateCommand
|
2019-05-23 05:00:49 +00:00
|
|
|
};
|