2019-05-12 13:44:03 +00:00
|
|
|
const fs = require('fs');
|
|
|
|
const {updateHTML} = require('./populate');
|
|
|
|
|
2019-05-20 09:17:39 +00:00
|
|
|
fs.readFile("./dist/config.json", function (err , data) {
|
2019-05-12 13:44:03 +00:00
|
|
|
if (err) throw err;
|
|
|
|
data = JSON.parse(data);
|
|
|
|
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-12 13:44:03 +00:00
|
|
|
});
|