@mattetti/custom-api-documenter
Advanced tools
Comparing version 0.2.2 to 0.3.0
# Change Log - @mattetti/custom-api-documenter | ||
## 0.3.0 Provide uris for members in the frontmatter | ||
## 0.2.0 Supports passing the path to a config file using --config + turning off YAML generation | ||
@@ -4,0 +6,0 @@ |
@@ -7,5 +7,5 @@ import { ApiItemKind } from "@microsoft/api-extractor-model"; | ||
summary?: string; | ||
members: Map<string, string[]>; | ||
members: Map<string, Map<string, string>>; | ||
toString(): string; | ||
} | ||
//# sourceMappingURL=FrontMatter.d.ts.map |
@@ -941,5 +941,5 @@ "use strict"; | ||
if (!this._frontMatter.members[element.kind]) { | ||
this._frontMatter.members[element.kind] = []; | ||
this._frontMatter.members[element.kind] = {}; | ||
} | ||
this._frontMatter.members[element.kind].push(element.displayName); | ||
this._frontMatter.members[element.kind][element.displayName] = this._getLinkFilenameForApiItem(element); | ||
}); | ||
@@ -1019,3 +1019,3 @@ const pkg = item.getAssociatedPackage(); | ||
} | ||
_getFilenameForApiItem(apiItem) { | ||
_getFilenameForApiItem(apiItem, linkToMD) { | ||
if (apiItem.kind === "Model" /* Model */) { | ||
@@ -1022,0 +1022,0 @@ return '/'; |
{ | ||
"name": "@mattetti/custom-api-documenter", | ||
"version": "0.2.2", | ||
"version": "0.3.0", | ||
"description": "Read JSON files from api-extractor, generate documentation pages", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -9,3 +9,3 @@ import { ApiItemKind } from "@microsoft/api-extractor-model"; | ||
public summary?: string; | ||
public members: Map<string, string[]> | ||
public members: Map<string, Map<string, string>> | ||
@@ -12,0 +12,0 @@ public toString(): string { |
@@ -1184,8 +1184,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. | ||
this._frontMatter.members = new Map<string, string[]>(); | ||
this._frontMatter.members = new Map<string, Map<string, string>>(); | ||
apiMembers.forEach(element => { | ||
if (element.displayName === "") { return } | ||
if (!this._frontMatter.members[element.kind]) { this._frontMatter.members[element.kind] = [] } | ||
this._frontMatter.members[element.kind].push(element.displayName); | ||
if (!this._frontMatter.members[element.kind]) { this._frontMatter.members[element.kind] = {} } | ||
this._frontMatter.members[element.kind][element.displayName] = this._getLinkFilenameForApiItem(element); | ||
}); | ||
@@ -1283,3 +1283,3 @@ | ||
private _getFilenameForApiItem(apiItem: ApiItem): string { | ||
private _getFilenameForApiItem(apiItem: ApiItem, linkToMD?: boolean): string { | ||
if (apiItem.kind === ApiItemKind.Model) { | ||
@@ -1286,0 +1286,0 @@ return '/'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1085139