Skip to content

Commit cbf1beb

Browse files
committed
Update docgen.ts to use new api-documenter
1 parent a99cfc6 commit cbf1beb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ export abstract class BaseAction extends CommandLineAction {
8484

8585
this._projectNameParameter = this.defineStringParameter({
8686
parameterLongName: '--project',
87-
parameterShortName: '-p',
8887
argumentName: 'PROJECT',
8988
description:
9089
`Name of the project (js, admin, functions, etc.). This will be ` +

scripts/docgen/docgen.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ import * as yargs from 'yargs';
2727
* Add to devsite files to alert anyone trying to make a documentation fix
2828
* to the generated files.
2929
*/
30-
const GOOGLE3_HEADER = `{% comment %}
30+
const GOOGLE3_HEADER = `
31+
{% comment %}
3132
DO NOT EDIT THIS FILE!
3233
This is generated by the JS SDK team, and any local changes will be
3334
overwritten. Changes should be made in the source code at
@@ -110,7 +111,7 @@ async function generateDocs(forDevsite: boolean = false) {
110111

111112
await spawn(
112113
'yarn',
113-
[command, 'markdown', '--input', 'temp', '--output', outputFolder],
114+
[command, 'markdown', '--input', 'temp', '--output', outputFolder, '--project', 'js'],
114115
{ stdio: 'inherit' }
115116
);
116117

@@ -119,7 +120,7 @@ async function generateDocs(forDevsite: boolean = false) {
119120
for (const mdFile of mdFiles) {
120121
const fullPath = join(projectRoot, outputFolder, mdFile);
121122
const content = fs.readFileSync(fullPath, 'utf-8');
122-
fs.writeFileSync(fullPath, GOOGLE3_HEADER + content);
123+
fs.writeFileSync(fullPath, content.replace('\n# ', `\n${GOOGLE3_HEADER}\n# `));
123124
}
124125
}
125126

0 commit comments

Comments
 (0)