start work on documentation generator

This commit is contained in:
Amish Shah
2016-08-14 18:12:59 +01:00
parent 0224138dc9
commit 62856ff57a
6 changed files with 82 additions and 2 deletions

View File

@@ -0,0 +1,8 @@
module.exports = {
category: 'General',
name: 'Getting Started',
data:
`# Welcome!
discord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.
`,
};

14
docs/custom/index.js Normal file
View File

@@ -0,0 +1,14 @@
const files = [
require('./getting_started'),
];
const categories = {};
for (const file of files) {
file.category = file.category.toLowerCase();
if (!categories[file.category]) {
categories[file.category] = {};
}
categories[file.category][file.name] = file.data;
}
module.exports = categories;