Skip to content

Commit 25d2894

Browse files
authored
Merge pull request microsoft#951 from Microsoft/pgonzal/ae-overhaul
[api-extractor] API Extractor 7 release branch
2 parents 2b420e7 + 9f479e5 commit 25d2894

214 files changed

Lines changed: 9274 additions & 10921 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎apps/api-documenter/package.json‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@microsoft/api-documenter",
3-
"version": "1.5.59",
3+
"version": "6.0.0",
44
"description": "Read JSON files from api-extractor, generate documentation pages",
55
"repository": {
66
"type": "git",
@@ -18,6 +18,7 @@
1818
"@microsoft/api-extractor": "6.3.0",
1919
"@microsoft/node-core-library": "3.7.0",
2020
"@microsoft/ts-command-line": "4.2.2",
21+
"@microsoft/tsdoc": "0.12.4",
2122
"colors": "~1.2.1",
2223
"js-yaml": "~3.9.1"
2324
},
@@ -27,6 +28,7 @@
2728
"@types/js-yaml": "3.9.1",
2829
"@types/node": "8.5.8",
2930
"gulp": "~3.9.1",
30-
"@types/jest": "21.1.10"
31+
"@types/jest": "21.1.10",
32+
"jest": "~22.4.3"
3133
}
3234
}

‎apps/api-documenter/src/cli/BaseAction.ts‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ import {
77
CommandLineAction,
88
CommandLineStringParameter
99
} from '@microsoft/ts-command-line';
10-
1110
import { FileSystem } from '@microsoft/node-core-library';
12-
13-
import { DocItemSet } from '../utils/DocItemSet';
11+
import { ApiModel } from '@microsoft/api-extractor';
1412

1513
export abstract class BaseAction extends CommandLineAction {
1614
protected inputFolder: string;
@@ -38,8 +36,8 @@ export abstract class BaseAction extends CommandLineAction {
3836
});
3937
}
4038

41-
protected buildDocItemSet(): DocItemSet {
42-
const docItemSet: DocItemSet = new DocItemSet();
39+
protected buildApiModel(): ApiModel {
40+
const apiModel: ApiModel = new ApiModel();
4341

4442
this.inputFolder = this._inputFolderParameter.value || './input';
4543
if (!FileSystem.exists(this.inputFolder)) {
@@ -53,10 +51,10 @@ export abstract class BaseAction extends CommandLineAction {
5351
if (filename.match(/\.api\.json$/i)) {
5452
console.log(`Reading ${filename}`);
5553
const filenamePath: string = path.join(this.inputFolder, filename);
56-
docItemSet.loadApiJsonFile(filenamePath);
54+
apiModel.loadPackage(filenamePath);
5755
}
5856
}
5957

60-
return docItemSet;
58+
return apiModel;
6159
}
6260
}

‎apps/api-documenter/src/cli/MarkdownAction.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
import { ApiDocumenterCommandLine } from './ApiDocumenterCommandLine';
55
import { BaseAction } from './BaseAction';
6-
import { DocItemSet } from '../utils/DocItemSet';
7-
import { MarkdownDocumenter } from '../markdown/MarkdownDocumenter';
6+
import { MarkdownDocumenter } from '../documenters/MarkdownDocumenter';
7+
import { ApiModel } from '@microsoft/api-extractor';
88

99
export class MarkdownAction extends BaseAction {
1010
constructor(parser: ApiDocumenterCommandLine) {
@@ -17,8 +17,8 @@ export class MarkdownAction extends BaseAction {
1717
}
1818

1919
protected onExecute(): Promise<void> { // override
20-
const docItemSet: DocItemSet = this.buildDocItemSet();
21-
const markdownDocumenter: MarkdownDocumenter = new MarkdownDocumenter(docItemSet);
20+
const apiModel: ApiModel = this.buildApiModel();
21+
const markdownDocumenter: MarkdownDocumenter = new MarkdownDocumenter(apiModel);
2222
markdownDocumenter.generateFiles(this.outputFolder);
2323
return Promise.resolve();
2424
}

‎apps/api-documenter/src/cli/YamlAction.ts‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import {
77

88
import { ApiDocumenterCommandLine } from './ApiDocumenterCommandLine';
99
import { BaseAction } from './BaseAction';
10-
import { DocItemSet } from '../utils/DocItemSet';
1110

12-
import { YamlDocumenter } from '../yaml/YamlDocumenter';
13-
import { OfficeYamlDocumenter } from '../yaml/OfficeYamlDocumenter';
11+
import { YamlDocumenter } from '../documenters/YamlDocumenter';
12+
import { OfficeYamlDocumenter } from '../documenters/OfficeYamlDocumenter';
13+
import { ApiModel } from '@microsoft/api-extractor';
1414

1515
export class YamlAction extends BaseAction {
1616
private _officeParameter: CommandLineFlagParameter;
@@ -35,11 +35,11 @@ export class YamlAction extends BaseAction {
3535
}
3636

3737
protected onExecute(): Promise<void> { // override
38-
const docItemSet: DocItemSet = this.buildDocItemSet();
38+
const apiModel: ApiModel = this.buildApiModel();
3939

4040
const yamlDocumenter: YamlDocumenter = this._officeParameter.value
41-
? new OfficeYamlDocumenter(docItemSet, this.inputFolder)
42-
: new YamlDocumenter(docItemSet);
41+
? new OfficeYamlDocumenter(apiModel, this.inputFolder)
42+
: new YamlDocumenter(apiModel);
4343

4444
yamlDocumenter.generateFiles(this.outputFolder);
4545
return Promise.resolve();

0 commit comments

Comments
 (0)