{"size": 870, "ext": "js", "max_stars_repo_path": "generator.js", "max_stars_repo_name": "AndreNIH/gddocs", "max_stars_repo_stars_event_min_datetime": "2021-12-27T18:09:01.000Z", "max_stars_repo_stars_event_max_datetime": "2021-12-27T18:09:01.000Z", "max_issues_repo_path": "generator.js", "max_issues_repo_name": "AndreNIH/gddocs", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "generator.js", "max_forks_repo_name": "AndreNIH/gddocs", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 37.8260869565, "max_line_length": 98, "alphanum_fraction": 0.6701149425}
/* eslint no-console: ["error", { allow: ["log", "warn", "error"] }] */
const childProcess = require("child_process");
require(`${__dirname}/scripts/install_packages.js`); // install packages

const chalk = require("chalk");

// serve data
let command = `node ${__dirname}/node_modules/docsify-cli/bin/docsify serve ./docs --port 9505`;
if (require("os").platform() === "win32") {
    command = `node "${__dirname}/node_modules/docsify-cli/bin/docsify" serve ./docs --port 9505`;
}

console.log(chalk.hex("#66d9ff")("Running Command: ") + command);
const docsProcess = childProcess.exec(command);
console.log("");

if (process.argv[2] == "--prod") {
    console.log(chalk.hex("#66d9ff")("Fetching latest Git changes..."));
    childProcess.exec("git pull origin master");
    require(`${__dirname}/scripts/git_pull.js`);
}

docsProcess.on("exit", () => process.exit(0));