Added toggle/options for help page generator
This commit is contained in:
parent
b6a2dd275a
commit
c357d3bc46
4 changed files with 24 additions and 16 deletions
|
@ -2,8 +2,7 @@ const pug = require("pug");
|
|||
const collections = require("./collections.js");
|
||||
const fs = require("fs");
|
||||
|
||||
module.exports = async () => {
|
||||
//const compiledFunction = pug.compileFile("./assets/pages/help.pug");
|
||||
module.exports = async (output) => {
|
||||
const commands = Array.from(collections.commands.keys());
|
||||
const categories = {
|
||||
general: [],
|
||||
|
@ -31,7 +30,7 @@ module.exports = async () => {
|
|||
categories.soundboard.push(`<strong>${command}</strong>${params ? ` ${params}` : ""} - ${description}`);
|
||||
}
|
||||
}
|
||||
fs.writeFile("../help.html", pug.renderFile("./assets/pages/help.pug", { commands: categories }), () => {
|
||||
console.log("hi");
|
||||
fs.writeFile(output, pug.renderFile("./assets/pages/help.pug", { commands: categories }), () => {
|
||||
console.log("The docs have been generated.");
|
||||
});
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue