feat(dgeni audit): add more keys to the api-list, this makes it easier to see changes across the api

This commit is contained in:
Eric Jimenez 2016-05-11 15:07:51 -04:00 committed by Naomi Black
parent 6a1e6e3bf6
commit d26461024c
2 changed files with 29 additions and 2 deletions

View File

@ -76,12 +76,34 @@ module.exports = function addJadeDataDocsProcessor() {
stability = 'deprecated';
}
var howToUse = '';
if(_.has(exportDoc, 'howToUse')) {
var howToUseArray = exportDoc.tags.tags.filter(function(tag) {
return tag.tagName === 'howToUse'
});
// Remove line breaks, there should only be one tag
howToUse = howToUseArray[0].description.replace(/(\r\n|\n|\r)/gm,"");
}
var whatItDoes = '';
if(_.has(exportDoc, 'whatItDoes')) {
var whatItDoesArray = exportDoc.tags.tags.filter(function(tag) {
return tag.tagName === 'whatItDoes'
});
// Remove line breaks, there should only be one tag
whatItDoes = whatItDoesArray[0].description.replace(/(\r\n|\n|\r)/gm,"");
}
var dataDoc = {
name: exportDoc.name + '-' + exportDoc.docType,
title: exportDoc.name,
docType: exportDoc.docType,
exportDoc: exportDoc,
stability: stability
stability: stability,
howToUse: howToUse,
whatItDoes: whatItDoes
};
if (exportDoc.symbolTypeName) dataDoc.varType = titleCase(exportDoc.symbolTypeName);

View File

@ -4,7 +4,12 @@
{
"title": "{$ item.title $}",
"path": "{$ item.exportDoc.path $}",
"docType": "{$ item.docType $}"
"docType": "{$ item.docType $}",
"stability": "{$ item.stability $}",
"secure": "{$ item.security $}",
"howToUse": "{$ item.howToUse $}",
"whatItDoes": {% if item.whatItDoes %}"Exists"{% else %}"Not Done"{% endif %},
"barrel" : "{$ module $}"
}{% if not loop.last %},{% endif %}
{% endfor %}]{% if not loop.last %},{% endif %}
{% endfor -%}