[ADF-2764] Applied new doc tool features to core library (#3383)

This commit is contained in:
Andy Stark
2018-05-23 19:30:48 +01:00
committed by Eugenio Romano
parent 5831bc1d77
commit 41777e0540
97 changed files with 965 additions and 788 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
| -- | -- | -- | -- |
<% properties.forEach(function(prop) { -%>
<% if (prop.isInput) { -%>
| <%= prop.name %> | `<%- prop.type %>` | <%- prop.defaultValue %> | <%- prop.docText %> |
| <%= prop.name %> | <% if (prop.type) { %>`<%- prop.type %>`<% } %> | <%- prop.defaultValue %> | <%- prop.docText %> |
<% } -%>
<% }) -%>
<% } %>
+2 -2
View File
@@ -3,10 +3,10 @@
### Methods
<% methods.forEach(function(meth) { -%>
- **<%= meth.name %>**<%= meth.signature %><% if (meth.returnsSomething) { %>: `<%- meth.returnType %>`<% } %><br/>
- **<%= meth.name %>**<%- meth.signature %><% if (meth.returnsSomething) { %>: `<%- meth.returnType %>`<% } %><br/>
<%= meth.docText %>
<% meth.params.forEach(function(param) { -%>
- *<%= param.name%>:* `<%- param.type %>` - <% if (param.isOptional) { %>(Optional)<% } %><%= param.docText %>
- *<%= param.name%>:* `<%- param.type %>` - <% if (param.isOptional) { %>(Optional) <% } %><%= param.docText %>
<% }) -%>
<% if (meth.returnsSomething) { -%>
- **Returns** `<%- meth.returnType %>` - <%= meth.returnDocText %>
+7 -7
View File
@@ -1,5 +1,5 @@
"use strict";
exports.__esModule = true;
Object.defineProperty(exports, "__esModule", { value: true });
var path = require("path");
var fs = require("fs");
var typedoc_1 = require("typedoc");
@@ -226,10 +226,10 @@ function handleLinksInBodyText(aggData, text) {
var link = resolveTypeLink(aggData, word);
var matchStart = void 0;
if (!link) {
var match = matcher.nextWord(word.toLowerCase(), scanner.index);
if (match && match[0]) {
link = resolveTypeLink(aggData, match[0].value);
matchStart = match[0].startPos;
var match_1 = matcher.nextWord(word.toLowerCase(), scanner.index);
if (match_1 && match_1[0]) {
link = resolveTypeLink(aggData, match_1[0].value);
matchStart = match_1[0].startPos;
}
}
else {
@@ -268,12 +268,12 @@ function resolveTypeLink(aggData, text) {
}
}
function cleanTypeName(text) {
var matches = text.match(/[a-zA-Z0-9_]+<([a-zA-Z0-9_]+)>/);
var matches = text.match(/[a-zA-Z0-9_]+<([a-zA-Z0-9_]+)(\[\])?>/);
if (matches) {
return matches[1];
}
else {
return text;
return text.replace(/\[\]$/, "");
}
}
function isLinkable(kind) {
+3 -2
View File
@@ -20,6 +20,7 @@ import { CommentTag } from "typedoc/dist/lib/models";
import * as unist from "../unistHelpers";
import * as ngHelpers from "../ngHelpers";
import { match } from "minimatch";
const includedNodeTypes = [
@@ -335,12 +336,12 @@ function resolveTypeLink(aggData, text): string {
function cleanTypeName(text) {
let matches = text.match(/[a-zA-Z0-9_]+<([a-zA-Z0-9_]+)>/);
let matches = text.match(/[a-zA-Z0-9_]+<([a-zA-Z0-9_]+)(\[\])?>/);
if (matches) {
return matches[1];
} else {
return text;
return text.replace(/\[\]$/, "");
}
}