Add custom file support to new docs

This commit is contained in:
Amish Shah
2016-08-22 17:03:36 +01:00
parent 601987ed01
commit be7ed4077a
5 changed files with 9 additions and 6 deletions

View File

@@ -8,10 +8,11 @@ const DocumentedEvent = require('./types/DocumentedEvent');
const GEN_VERSION = require('./config.json').GEN_VERSION;
class Documentation {
constructor(items) {
constructor(items, custom) {
this.classes = new Map();
this.interfaces = new Map();
this.typedefs = new Map();
this.custom = custom;
this.parse(items);
}
@@ -104,6 +105,7 @@ class Documentation {
classes: Array.from(this.classes.values()).map(c => c.serialize()),
interfaces: Array.from(this.interfaces.values()).map(i => i.serialize()),
typedefs: Array.from(this.typedefs.values()).map(t => t.serialize()),
custom: this.custom,
};
return serialized;
}