Skip to content

Commit d027c27

Browse files
committed
Formatting pass
1 parent c37d61d commit d027c27

File tree

4 files changed

+29
-10
lines changed

4 files changed

+29
-10
lines changed

repo-scripts/api-documenter/src/cli/BaseAction.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,13 @@ export abstract class BaseAction extends CommandLineAction {
115115

116116
this._applyInheritDoc(apiModel, apiModel);
117117

118-
return { apiModel, inputFolder, outputFolder, addFileNameSuffix, projectName: this._projectNameParameter.value };
118+
return {
119+
apiModel,
120+
inputFolder,
121+
outputFolder,
122+
addFileNameSuffix,
123+
projectName: this._projectNameParameter.value
124+
};
119125
}
120126

121127
// TODO: This is a temporary workaround. The long term plan is for API Extractor's DocCommentEnhancer

repo-scripts/api-documenter/src/cli/MarkdownAction.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ export class MarkdownAction extends BaseAction {
3535

3636
protected async onExecute(): Promise<void> {
3737
// override
38-
const { apiModel, outputFolder, addFileNameSuffix, projectName } = this.buildApiModel();
38+
const { apiModel, outputFolder, addFileNameSuffix, projectName } =
39+
this.buildApiModel();
3940

4041
if (!projectName) {
4142
throw new Error('No project name provided. Use --project.');

repo-scripts/api-documenter/src/documenters/MarkdownDocumenter.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,11 @@ export class MarkdownDocumenter {
171171
`Project: /docs/reference/${this._projectName}/_project.yaml
172172
Book: /docs/reference/_book.yaml
173173
page_type: reference
174-
`);
175-
176-
stringBuilder.append(
177-
`# ${headingNode.title}\n`
174+
`
178175
);
179176

177+
stringBuilder.append(`# ${headingNode.title}\n`);
178+
180179
this._markdownEmitter.emit(stringBuilder, output, {
181180
contextApiItem: apiItem,
182181
onGetFilenameForApiItem: (apiItemForFilename: ApiItem) => {
@@ -256,8 +255,9 @@ page_type: reference
256255
output.push(
257256
new DocHeading({
258257
configuration,
259-
title: `${packageName}${apiItem.displayName && '/' + apiItem.displayName
260-
}`
258+
title: `${packageName}${
259+
apiItem.displayName && '/' + apiItem.displayName
260+
}`
261261
})
262262
);
263263
break;

scripts/docgen/docgen.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,16 @@ async function generateDocs(forDevsite: boolean = false) {
111111

112112
await spawn(
113113
'yarn',
114-
[command, 'markdown', '--input', 'temp', '--output', outputFolder, '--project', 'js'],
114+
[
115+
command,
116+
'markdown',
117+
'--input',
118+
'temp',
119+
'--output',
120+
outputFolder,
121+
'--project',
122+
'js'
123+
],
115124
{ stdio: 'inherit' }
116125
);
117126

@@ -120,7 +129,10 @@ async function generateDocs(forDevsite: boolean = false) {
120129
for (const mdFile of mdFiles) {
121130
const fullPath = join(projectRoot, outputFolder, mdFile);
122131
const content = fs.readFileSync(fullPath, 'utf-8');
123-
fs.writeFileSync(fullPath, content.replace('\n# ', `\n${GOOGLE3_HEADER}\n# `));
132+
fs.writeFileSync(
133+
fullPath,
134+
content.replace('\n# ', `\n${GOOGLE3_HEADER}\n# `)
135+
);
124136
}
125137
}
126138

0 commit comments

Comments
 (0)