build(aio): render doc-gen issues in overview dump (#22675)
Related to #22138 PR Close #22675
This commit is contained in:
parent
37fedd001c
commit
6f0dad1710
|
@ -1,6 +1,7 @@
|
||||||
module.exports = function(log, createDocMessage) {
|
module.exports = function(log, createDocMessage) {
|
||||||
return {
|
return {
|
||||||
name: 'howToUse',
|
name: 'howToUse',
|
||||||
|
deprecated: true,
|
||||||
transforms(doc, tag, value) {
|
transforms(doc, tag, value) {
|
||||||
log.warn(createDocMessage('Deprecated `@howToUse` tag found', doc));
|
log.warn(createDocMessage('Deprecated `@howToUse` tag found', doc));
|
||||||
log.warn('PLEASE FIX by renaming to `@usageNotes.');
|
log.warn('PLEASE FIX by renaming to `@usageNotes.');
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
module.exports = function(log, createDocMessage) {
|
module.exports = function(log, createDocMessage) {
|
||||||
return {
|
return {
|
||||||
name: 'stable',
|
name: 'stable',
|
||||||
|
deprecated: true,
|
||||||
transforms(doc, tag, value) {
|
transforms(doc, tag, value) {
|
||||||
log.warn(createDocMessage('Deprecated `@stable` tag found', doc));
|
log.warn(createDocMessage('Deprecated `@stable` tag found', doc));
|
||||||
log.warn('PLEASE REMOVE - its value is now computed.');
|
log.warn('PLEASE REMOVE - its value is now computed.');
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
module.exports = function(log, createDocMessage) {
|
module.exports = function(log, createDocMessage) {
|
||||||
return {
|
return {
|
||||||
name: 'whatItDoes',
|
name: 'whatItDoes',
|
||||||
|
deprecated: true,
|
||||||
transforms(doc, tag, value) {
|
transforms(doc, tag, value) {
|
||||||
log.warn(createDocMessage('Deprecated `@whatItDoes` tag found', doc));
|
log.warn(createDocMessage('Deprecated `@whatItDoes` tag found', doc));
|
||||||
log.warn('PLEASE FIX by adding the content of this tag as the first paragraph of the `@description` tag.');
|
log.warn('PLEASE FIX by adding the content of this tag as the first paragraph of the `@description` tag.');
|
||||||
|
|
|
@ -24,7 +24,6 @@ module.exports = new Package('angular-base', [
|
||||||
|
|
||||||
// Register the processors
|
// Register the processors
|
||||||
.processor(require('./processors/generateKeywords'))
|
.processor(require('./processors/generateKeywords'))
|
||||||
.processor(require('./processors/createOverviewDump'))
|
|
||||||
.processor(require('./processors/createSitemap'))
|
.processor(require('./processors/createSitemap'))
|
||||||
.processor(require('./processors/checkUnbalancedBackTicks'))
|
.processor(require('./processors/checkUnbalancedBackTicks'))
|
||||||
.processor(require('./processors/convertToJson'))
|
.processor(require('./processors/convertToJson'))
|
||||||
|
|
|
@ -17,6 +17,7 @@ module.exports = new Package('angular.io', [gitPackage, apiPackage, contentPacka
|
||||||
|
|
||||||
// This processor relies upon the versionInfo. See below...
|
// This processor relies upon the versionInfo. See below...
|
||||||
.processor(require('./processors/processNavigationMap'))
|
.processor(require('./processors/processNavigationMap'))
|
||||||
|
.processor(require('./processors/createOverviewDump'))
|
||||||
.processor(require('./processors/cleanGeneratedFiles'))
|
.processor(require('./processors/cleanGeneratedFiles'))
|
||||||
|
|
||||||
// We don't include this in the angular-base package because the `versionInfo` stuff
|
// We don't include this in the angular-base package because the `versionInfo` stuff
|
||||||
|
|
|
@ -1,74 +1,110 @@
|
||||||
{% import "api/lib/githubLinks.html" as github -%}
|
{% import "api/lib/githubLinks.html" as github -%}
|
||||||
{% import "api/lib/paramList.html" as params -%}
|
{% import "api/lib/memberHelpers.html" as members -%}
|
||||||
|
{% macro goToCode(doc) %}<a href="{$ github.githubViewHref(doc, versionInfo) $}" class="go-to-code" title="Go to source code"><i class="material-icons" aria-hidden="true" role="img">code</i></a>{% endmacro %}
|
||||||
|
{% macro label(test, class, text) %}{% if test %}<label class="{$ class $}">{$ text $}</label>{% endif %}{% endmacro %}
|
||||||
|
{% macro renderLabels(doc) -%}
|
||||||
|
{$ label(doc.notYetDocumented, 'no-doc', 'UNDOCUMENTED') $}
|
||||||
|
{%- for tag in doc.tags.tags %}{$ label(tag.tagDef.deprecated, 'deprecated', '@' + tag.tagDef.name + ' deprecated') $}{% endfor %}
|
||||||
|
{% endmacro %}
|
||||||
|
{% macro renderMember(member) -%}
|
||||||
|
<div class="member">{$ goToCode(member) $}
|
||||||
|
<h4><code>{$ members.renderMemberSyntax(member, 1) $}</code></h4>
|
||||||
|
{$ renderLabels(member) $}
|
||||||
|
</div>
|
||||||
|
{% endmacro -%}
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title></title>
|
<title></title>
|
||||||
|
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
max-width: 1000px;
|
margin: 0 50px;
|
||||||
}
|
}
|
||||||
h2 {
|
details {
|
||||||
margin-top: 20px;
|
margin: 10px;
|
||||||
margin-bottom: 0;
|
padding: 0 10px;
|
||||||
border-bottom: solid 1px black;
|
border: solid black 1px;
|
||||||
}
|
}
|
||||||
h3 {
|
details details {
|
||||||
margin-top: 10px;
|
border: none;
|
||||||
margin-bottom: 0;
|
|
||||||
padding-left: 20px;
|
|
||||||
}
|
|
||||||
h4 {
|
|
||||||
padding-left: 30px;
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
.not-documented::after {
|
|
||||||
content: "(not documented)";
|
.member:nth-child(odd) {
|
||||||
font-size: small;
|
background-color: #eee;
|
||||||
font-style: italic;
|
|
||||||
color: red;
|
|
||||||
}
|
}
|
||||||
a {
|
h2, h3, h4 {
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
h3 {
|
||||||
|
padding-left: 15px;
|
||||||
|
}
|
||||||
|
h4 {
|
||||||
|
padding: 10px 0 0 30px;
|
||||||
|
}
|
||||||
|
div {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 4px 8px;
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #fff;
|
||||||
|
margin: 0 8px;
|
||||||
|
font-weight: bold;
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-doc {
|
||||||
|
background-color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.deprecated {
|
||||||
|
background-color: orange;
|
||||||
color: black;
|
color: black;
|
||||||
text-decoration: none;
|
}
|
||||||
|
|
||||||
|
a.go-to-code {
|
||||||
|
position: absolute;
|
||||||
|
top: 10px;
|
||||||
|
right: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
|
||||||
<h1>Module Overview</h1>
|
<h1>Documentation Status Report</h1>
|
||||||
|
|
||||||
{% for module in doc.modules %}
|
{% for module in doc.modules %}
|
||||||
|
<details>
|
||||||
<h2>
|
<summary><h2><code>{$ module.id $}{%- if module.public %} (public){% endif %}</code></h2></summary>
|
||||||
<code>{$ module.id $}{%- if module.public %} (public){% endif %}</code>
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
{% for export in module.exports %}
|
{% for export in module.exports %}
|
||||||
<h3 {% if export.notYetDocumented %}class="not-documented"{% endif %}>
|
<div class="export">{$ goToCode(export) $}
|
||||||
<a href="{$ github.githubViewHref(export, versionInfo) $}">
|
<details>
|
||||||
<code>{$ export.docType $} {$ export.name $}</code>
|
<summary><h3><code>{$ export.docType $} {$ export.name $}</code></h3>{$ renderLabels(export) $}</summary>
|
||||||
</a>
|
|
||||||
</h3>
|
|
||||||
{%- if export.constructorDoc %}
|
|
||||||
<h4 {% if export.constructorDoc.notYetDocumented %}class="not-documented"{% endif %}>
|
|
||||||
<a href="{$ github.githubViewHref(export.constructorDoc, versionInfo) $}">
|
|
||||||
<code>{$ export.constructorDoc.name $}{$ params.paramList(export.constructorDoc.params) $}</code>
|
|
||||||
</a>
|
|
||||||
</h4>
|
|
||||||
{% endif -%}
|
|
||||||
{%- for member in export.members %}
|
|
||||||
<h4 {% if member.notYetDocumented %}class="not-documented"{% endif %}>
|
|
||||||
<a href="{$ github.githubViewHref(member, versionInfo) $}">
|
|
||||||
<code>{$ member.name $}{$ params.paramList(member.params) $}</code>
|
|
||||||
</a>
|
|
||||||
</h4>
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
{% endfor %}
|
{%- for member in export.staticProperties %}{% if not member.internal %}
|
||||||
|
{$ renderMember(member) $}</a>{% endif %}{% endfor -%}
|
||||||
|
{% for member in export.staticMethods %}{% if not member.internal %}
|
||||||
|
{$ renderMember(member) $}</a>{% endif %}{% endfor -%}
|
||||||
|
{% if export.constructorDoc and not export.constructorexport.internal %}
|
||||||
|
{$ renderMember(export.constructorDoc) $}</a>{% endif -%}
|
||||||
|
{% for member in export.properties %}{% if not member.internal %}
|
||||||
|
{$ renderMember(member) $}</a>{% endif %}{% endfor -%}
|
||||||
|
{% for member in export.methods %}{% if not member.internal %}
|
||||||
|
{$ renderMember(member) $}</a>{% endif %}{% endfor -%}
|
||||||
|
|
||||||
|
</details>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</details>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue