Track and warn about "Not yet documented" pages and also add "Not Yet Documented" to the top of these pages.

This commit is contained in:
Jay Traband 2015-10-17 18:52:30 -07:00 committed by Naomi Black
parent fae960d08a
commit 6393774355
3 changed files with 20 additions and 1 deletions

View File

@ -9,7 +9,11 @@ p.location-badge.
defined in {$ githubViewLink(doc) $}
:markdown
{%- if doc.notYetDocumented %}
### *Not Yet Documented*
{% else %}
{$ doc.description | indentForMarkdown(2) | trimBlankLines $}
{% endif -%}
{%- if doc.decorators %}
.l-main-section

View File

@ -9,5 +9,9 @@ include ../../_util-fns
defined in {$ githubViewLink(doc) $}
:markdown
{%- if doc.notYetDocumented %}
### *Not Yet Documented*
{% else %}
{$ doc.description | indentForMarkdown(4) | trimBlankLines $}
{% endif -%}
{% endblock %}

View File

@ -4,7 +4,7 @@ var _ = require('lodash');
var ts = require('typescript');
module.exports = function readTypeScriptModules(tsParser, modules, getFileInfo,
getExportDocType, getContent, log) {
getExportDocType, getContent, createDocMessage, log) {
return {
$runAfter: ['files-read'],
@ -126,6 +126,17 @@ module.exports = function readTypeScriptModules(tsParser, modules, getFileInfo,
}
}
// NotYetDocumented means that no top level comments and no member level comments
var notYetDocumented = exportDoc.content.trim().length == 0;
exportDoc.notYetDocumented = notYetDocumented && exportDoc.members.every(function(member) {
var content = member.content.trim();
return content.length == 0;
});
if (exportDoc.notYetDocumented) {
log.warn(createDocMessage("Not yet documented", exportDoc));
}
if (sortClassMembers) {
exportDoc.members.sort(function(a, b) {
if (a.name > b.name) return 1;