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:
parent
fae960d08a
commit
6393774355
|
@ -9,7 +9,11 @@ p.location-badge.
|
||||||
defined in {$ githubViewLink(doc) $}
|
defined in {$ githubViewLink(doc) $}
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
{%- if doc.notYetDocumented %}
|
||||||
|
### *Not Yet Documented*
|
||||||
|
{% else %}
|
||||||
{$ doc.description | indentForMarkdown(2) | trimBlankLines $}
|
{$ doc.description | indentForMarkdown(2) | trimBlankLines $}
|
||||||
|
{% endif -%}
|
||||||
|
|
||||||
{%- if doc.decorators %}
|
{%- if doc.decorators %}
|
||||||
.l-main-section
|
.l-main-section
|
||||||
|
|
|
@ -9,5 +9,9 @@ include ../../_util-fns
|
||||||
defined in {$ githubViewLink(doc) $}
|
defined in {$ githubViewLink(doc) $}
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
{%- if doc.notYetDocumented %}
|
||||||
|
### *Not Yet Documented*
|
||||||
|
{% else %}
|
||||||
{$ doc.description | indentForMarkdown(4) | trimBlankLines $}
|
{$ doc.description | indentForMarkdown(4) | trimBlankLines $}
|
||||||
|
{% endif -%}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -4,7 +4,7 @@ var _ = require('lodash');
|
||||||
var ts = require('typescript');
|
var ts = require('typescript');
|
||||||
|
|
||||||
module.exports = function readTypeScriptModules(tsParser, modules, getFileInfo,
|
module.exports = function readTypeScriptModules(tsParser, modules, getFileInfo,
|
||||||
getExportDocType, getContent, log) {
|
getExportDocType, getContent, createDocMessage, log) {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
$runAfter: ['files-read'],
|
$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) {
|
if (sortClassMembers) {
|
||||||
exportDoc.members.sort(function(a, b) {
|
exportDoc.members.sort(function(a, b) {
|
||||||
if (a.name > b.name) return 1;
|
if (a.name > b.name) return 1;
|
||||||
|
|
Loading…
Reference in New Issue