chore(doc-gen): make the module of the export's original declaration available

This commit is contained in:
Peter Bacon Darwin
2015-09-16 21:35:35 +01:00
committed by Naomi Black
parent 19274e744d
commit dad40751d4
7 changed files with 38 additions and 12 deletions

View File

@ -51,12 +51,14 @@ module.exports = function addJadeDataDocsProcessor() {
// GET DATA FOR EACH PAGE (CLASS, VARS, FUNCTIONS)
var modulePageInfo = _(doc.exports)
.map(function(exportDoc) {
return {
var dataDoc = {
name: exportDoc.name + '-' + exportDoc.docType,
title: exportDoc.name,
docType: exportDoc.docType,
varType: exportDoc.symbolTypeName && titleCase(exportDoc.symbolTypeName)
docType: exportDoc.docType
};
if (exportDoc.symbolTypeName) dataDoc.varType = titleCase(exportDoc.symbolTypeName);
if (exportDoc.originalModule) dataDoc.originalModule = exportDoc.originalModule;
return dataDoc;
})
.sortBy('name')
.value();