repair doc tools and polish the docs code (#5038)

* set private access modifier

* repair doc build tools

* fix lit issues

* re-generate version index
This commit is contained in:
Denys Vuika
2019-08-30 17:26:10 +01:00
committed by Eugenio Romano
parent 3bebc7a18c
commit 2b1250cae7
32 changed files with 727 additions and 877 deletions

View File

@@ -1,5 +1,5 @@
"use strict";
exports.__esModule = true;
Object.defineProperty(exports, "__esModule", { value: true });
var path = require("path");
var unist_util_select_1 = require("unist-util-select");
var ngHelpers = require("../ngHelpers");
@@ -18,7 +18,7 @@ function processDocs(mdCache, aggData) {
var titleHeading = unist_util_select_1.select('heading[depth=1]:first-of-type', tree);
var relDocPath = pathname.substring(pathname.indexOf('docs'));
var srcUrl = fixRelSrcUrl(relDocPath, sourcePath);
if (titleHeading && titleHeading.children[0] && titleHeading.children[0].type === "text") {
if (titleHeading && titleHeading.children[0] && titleHeading.children[0].type === 'text') {
var titleText = titleHeading.children[0];
titleHeading.children[0] = {
type: 'link',
@@ -27,9 +27,9 @@ function processDocs(mdCache, aggData) {
children: [titleText]
};
}
else if ((titleHeading && titleHeading.children[0].type === "link") && sourcePath) {
else if ((titleHeading && titleHeading.children[0].type === 'link') && sourcePath) {
var linkElem = titleHeading.children[0];
linkElem.url = srcUrl,
linkElem.url = srcUrl, // `../../${sourcePath}`;
linkElem.title = "Defined in " + path.basename(sourcePath);
}
});