Skip to content

Commit 11e045a

Browse files
authored
Fix docgen script (#990)
1 parent ede96e6 commit 11e045a

File tree

5 files changed

+94
-88
lines changed

5 files changed

+94
-88
lines changed

docgen/content-sources/v1/toc.yaml

Lines changed: 66 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,148 +1,154 @@
11
toc:
22
- title: 'functions'
3-
path: /docs/reference/functions/v1_cloud_functions_.html
3+
path: /docs/reference/functions/cloud_functions.html
44
section:
55
- title: 'CloudFunction'
6-
path: /docs/reference/functions/v1_cloud_functions_.html#cloudfunction
6+
path: /docs/reference/functions/cloud_functions.html#cloudfunction
77
- title: 'HttpsFunction'
8-
path: /docs/reference/functions/v1_cloud_functions_.html#httpsfunction
8+
path: /docs/reference/functions/cloud_functions.html#httpsfunction
99
- title: 'EventContext'
10-
path: /docs/reference/functions/v1_cloud_functions_.eventcontext.html
10+
path: /docs/reference/functions/cloud_functions.eventcontext.html
1111
- title: 'FunctionBuilder'
12-
path: /docs/reference/functions/v1_function_builder_.functionbuilder.html
12+
path: /docs/reference/functions/function_builder.functionbuilder.html
1313
- title: 'Change'
14-
path: /docs/reference/functions/v1_cloud_functions_.change.html
14+
path: /docs/reference/functions/cloud_functions.change.html
1515
- title: 'ChangeJson'
16-
path: /docs/reference/functions/v1_cloud_functions_.changejson.html
16+
path: /docs/reference/functions/cloud_functions.changejson.html
1717

1818
- title: 'functions.config'
19-
path: /docs/reference/functions/v1_config_.html
19+
path: /docs/reference/functions/config.html
2020
section:
2121
- title: 'Config'
22-
path: /docs/reference/functions/v1_config_.config.html
22+
path: /docs/reference/functions/config.config-1.html
2323
- title: 'config.Config'
24-
path: /docs/reference/functions/v1_config_.config.config.html
24+
path: /docs/reference/functions/config.config-1.config.html
2525

2626
- title: 'functions.function-configuration'
27-
path: /docs/reference/functions/v1_function_configuration_.html
27+
path: /docs/reference/functions/function_configuration.html
2828
section:
2929
- title: 'config.DeploymentOptions'
30-
path: /docs/reference/functions/v1_function_configuration_.deploymentoptions.html
30+
path: /docs/reference/functions/function_configuration.deploymentoptions.html
3131
- title: 'config.FailurePolicy'
32-
path: /docs/reference/functions/v1_function_configuration_.failurepolicy.html
32+
path: /docs/reference/functions/function_configuration.failurepolicy.html
3333
- title: 'config.RuntimeOptions'
34-
path: /docs/reference/functions/v1_function_configuration_.runtimeoptions.html
34+
path: /docs/reference/functions/function_configuration.runtimeoptions.html
3535
- title: 'config.Schedule'
36-
path: /docs/reference/functions/v1_function_configuration_.schedule.html
36+
path: /docs/reference/functions/function_configuration.schedule.html
3737
- title: 'config.ScheduleRetryConfig'
38-
path: /docs/reference/functions/v1_function_configuration_.scheduleretryconfig.html
38+
path: /docs/reference/functions/function_configuration.scheduleretryconfig.html
3939

4040
- title: 'functions.analytics'
41-
path: /docs/reference/functions/v1_providers_analytics_.html
41+
path: /docs/reference/functions/providers_analytics.html
4242
section:
4343
- title: 'AnalyticsEvent'
44-
path: /docs/reference/functions/v1_providers_analytics_.analyticsevent.html
44+
path: /docs/reference/functions/providers_analytics.analyticsevent.html
4545
- title: 'AnalyticsEventBuilder'
46-
path: /docs/reference/functions/v1_providers_analytics_.analyticseventbuilder.html
46+
path: /docs/reference/functions/providers_analytics.analyticseventbuilder.html
4747
- title: 'AppInfo'
48-
path: /docs/reference/functions/v1_providers_analytics_.appinfo.html
48+
path: /docs/reference/functions/providers_analytics.appinfo.html
4949
- title: 'DeviceInfo'
50-
path: /docs/reference/functions/v1_providers_analytics_.deviceinfo.html
50+
path: /docs/reference/functions/providers_analytics.deviceinfo.html
5151
- title: 'ExportBundleInfo'
52-
path: /docs/reference/functions/v1_providers_analytics_.exportbundleinfo.html
52+
path: /docs/reference/functions/providers_analytics.exportbundleinfo.html
5353
- title: 'GeoInfo'
54-
path: /docs/reference/functions/v1_providers_analytics_.geoinfo.html
54+
path: /docs/reference/functions/providers_analytics.geoinfo.html
5555
- title: 'UserDimensions'
56-
path: /docs/reference/functions/v1_providers_analytics_.userdimensions.html
56+
path: /docs/reference/functions/providers_analytics.userdimensions.html
5757
- title: 'UserPropertyValue'
58-
path: /docs/reference/functions/v1_providers_analytics_.userpropertyvalue.html
58+
path: /docs/reference/functions/providers_analytics.userpropertyvalue.html
5959

6060
- title: 'functions.auth'
61-
path: /docs/reference/functions/v1_providers_auth_.html
61+
path: /docs/reference/functions/providers_auth.html
6262
section:
6363
- title: 'UserBuilder'
64-
path: /docs/reference/functions/v1_providers_auth_.userbuilder.html
64+
path: /docs/reference/functions/providers_auth.userbuilder.html
6565
- title: 'UserInfo'
66-
path: /docs/reference/functions/v1_providers_auth_.html#userinfo
66+
path: /docs/reference/functions/providers_auth.html#userinfo
6767
- title: 'UserRecordMetadata'
68-
path: /docs/reference/functions/v1_providers_auth_.userrecordmetadata.html
68+
path: /docs/reference/functions/providers_auth.userrecordmetadata.html
6969
- title: 'UserRecord'
70-
path: /docs/reference/functions/v1_providers_auth_.html#userrecord
70+
path: /docs/reference/functions/providers_auth.html#userrecord
7171

7272
- title: 'functions.firestore'
73-
path: /docs/reference/functions/v1_providers_firestore_.html
73+
path: /docs/reference/functions/providers_firestore.html
7474
section:
7575
- title: 'DocumentBuilder'
76-
path: /docs/reference/functions/v1_providers_firestore_.documentbuilder.html
76+
path: /docs/reference/functions/providers_firestore.documentbuilder.html
7777
- title: 'DocumentSnapshot'
78-
path: /docs/reference/functions/v1_providers_firestore_.html#documentsnapshot
78+
path: /docs/reference/functions/providers_firestore.html#documentsnapshot
7979

8080
- title: 'functions.database'
81-
path: /docs/reference/functions/v1_providers_database_.html
81+
path: /docs/reference/functions/providers_database.html
8282
section:
8383
- title: 'DataSnapshot'
84-
path: /docs/reference/functions/v1_providers_database_.datasnapshot.html
84+
path: /docs/reference/functions/providers_database.datasnapshot.html
8585
- title: 'RefBuilder'
86-
path: /docs/reference/functions/v1_providers_database_.refbuilder.html
86+
path: /docs/reference/functions/providers_database.refbuilder.html
8787
- title: 'InstanceBuilder'
88-
path: /docs/reference/functions/v1_providers_database_.instancebuilder.html
88+
path: /docs/reference/functions/providers_database.instancebuilder.html
8989

9090
- title: 'functions.https'
91-
path: /docs/reference/functions/v1_providers_https_.html
91+
path: /docs/reference/functions/providers_https.html
9292
section:
9393
- title: 'HttpsError'
94-
path: /docs/reference/functions/v1_providers_https_.httpserror.html
94+
path: /docs/reference/functions/common_providers_https.httpserror.html
95+
- title: 'CallableRequest'
96+
path: /docs/reference/functions/common_providers_https.callablerequest.html
9597
- title: 'CallableContext'
96-
path: /docs/reference/functions/v1_providers_https_.callablecontext.html
98+
path: /docs/reference/functions/common_providers_https.callablecontext.html
99+
- title: 'AuthData'
100+
path: /docs/reference/functions/common_providers_https.authdata.html
101+
- title: 'AppCheckData'
102+
path: /docs/reference/functions/common_providers_https.appcheckdata.html
97103

98104
- title: 'functions.logger'
99-
path: /docs/reference/functions/logger_index_.html
105+
path: /docs/reference/functions/logger.html
100106
section:
101107
- title: 'LogEntry'
102-
path: /docs/reference/functions/logger_index_.logentry.html
108+
path: /docs/reference/functions/logger.logentry.html
103109

104110
- title: 'functions.pubsub'
105-
path: /docs/reference/functions/v1_providers_pubsub_.html
111+
path: /docs/reference/functions/providers_pubsub.html
106112
section:
107113
- title: 'Message'
108-
path: /docs/reference/functions/v1_providers_pubsub_.message.html
114+
path: /docs/reference/functions/providers_pubsub.message.html
109115
- title: 'TopicBuilder'
110-
path: /docs/reference/functions/v1_providers_pubsub_.topicbuilder.html
116+
path: /docs/reference/functions/providers_pubsub.topicbuilder.html
111117
- title: 'ScheduleBuilder'
112-
path: /docs/reference/functions/v1_providers_pubsub_.schedulebuilder.html
118+
path: /docs/reference/functions/providers_pubsub.schedulebuilder.html
113119

114120
- title: 'functions.remoteconfig'
115-
path: /docs/reference/functions/v1_providers_remoteconfig_.html
121+
path: /docs/reference/functions/providers_remoteconfig.html
116122
section:
117123
- title: 'RemoteConfigUser'
118-
path: /docs/reference/functions/v1_providers_remoteconfig_.remoteconfiguser.html
124+
path: /docs/reference/functions/providers_remoteconfig.remoteconfiguser.html
119125
- title: 'TemplateVersion'
120-
path: /docs/reference/functions/v1_providers_remoteconfig_.templateversion.html
126+
path: /docs/reference/functions/providers_remoteconfig.templateversion.html
121127

122128
- title: 'functions.storage'
123-
path: /docs/reference/functions/v1_providers_storage_.html
129+
path: /docs/reference/functions/providers_storage.html
124130
section:
125131
- title: 'BucketBuilder'
126-
path: /docs/reference/functions/v1_providers_storage_.bucketbuilder.html
132+
path: /docs/reference/functions/providers_storage.bucketbuilder.html
127133
- title: 'ObjectBuilder'
128-
path: /docs/reference/functions/v1_providers_storage_.objectbuilder.html
134+
path: /docs/reference/functions/providers_storage.objectbuilder.html
129135
- title: 'ObjectMetadata'
130-
path: /docs/reference/functions/v1_providers_storage_.objectmetadata.html
136+
path: /docs/reference/functions/providers_storage.objectmetadata.html
131137

132138
- title: 'functions.testLab'
133-
path: /docs/reference/functions/v1_providers_testlab_.html
139+
path: /docs/reference/functions/providers_testlab.html
134140
section:
135141
- title: 'testLab.clientInfo'
136-
path: /docs/reference/functions/v1_providers_testlab_.clientinfo.html
142+
path: /docs/reference/functions/providers_testlab.clientinfo.html
137143
- title: 'testLab.resultStorage'
138-
path: /docs/reference/functions/v1_providers_testlab_.resultstorage.html
144+
path: /docs/reference/functions/providers_testlab.resultstorage.html
139145
- title: 'testLab.testMatrix'
140-
path: /docs/reference/functions/v1_providers_testlab_.testmatrix.html
146+
path: /docs/reference/functions/providers_testlab.testmatrix.html
141147
- title: 'testLab.testMatrixBuilder'
142-
path: /docs/reference/functions/v1_providers_testlab_.testmatrixbuilder.html
148+
path: /docs/reference/functions/providers_testlab.testmatrixbuilder.html
143149

144150
- title: 'functions.handler'
145-
path: /docs/reference/functions/v1_handler_builder_.html
151+
path: /docs/reference/functions/handler_builder.html
146152
section:
147153
- title: 'HandlerBuilder'
148-
path: /docs/reference/functions/v1_handler_builder_.handlerbuilder.html
154+
path: /docs/reference/functions/handler_builder.handlerbuilder.html

docgen/generate-docs.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,17 @@ const { api: apiVersion } = yargs
3333
.version(false)
3434
.help().argv;
3535

36-
let sourceFile, devsitePath;
36+
let sourceFile, devsitePath, exclude;
3737
switch (apiVersion) {
3838
case 'v1':
39-
sourceFile = `${repoPath}/src/{v1,logger}`;
39+
sourceFile = `${repoPath}/src`;
4040
devsitePath = '/docs/reference/functions/';
41+
exclude = ['"**/v2/**/*.ts"', '"src/index.ts"'];
4142
break;
4243
case 'v2':
4344
sourceFile = `${repoPath}/src/{v2,logger}`;
4445
devsitePath = '/docs/functions/alpha/';
46+
exclude = [];
4547
break;
4648
default:
4749
throw new Error(
@@ -75,6 +77,7 @@ function stripPath(path) {
7577
function runTypedoc() {
7678
const command = `${repoPath}/node_modules/.bin/typedoc ${sourceFile} \
7779
--out ${docPath} \
80+
${exclude.map(ex => "--exclude " + ex).join(" ")} \
7881
--readme ${tempHomePath} \
7982
--options ${__dirname}/typedoc.js \
8083
--theme ${__dirname}/theme`;

docgen/theme/layouts/default.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="hide_page_heading" value="true" />
77
<meta name="project_path" value="/_project.yaml" />
8-
<meta name="book_path" value="/docs/_book.yaml" />
9-
<meta name="gtm_var" data-key="docType" data-value="how-to">
8+
<meta name="book_path" value="/docs/reference/_book.yaml" />
9+
<meta name="gtm_var" data-key="docType" data-value="reference">
1010
<meta name="page_type" value="reference" />
1111
<meta name="translation" value="disabled" />
1212
<title>{{#ifCond model.name '==' project.name}}{{project.name}}{{else}}{{model.name}} | {{project.name}}{{/ifCond}}</title>

package-lock.json

Lines changed: 20 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@
168168
"tslint-config-prettier": "^1.18.0",
169169
"tslint-no-unused-expression-chai": "^0.1.4",
170170
"tslint-plugin-prettier": "^2.0.1",
171-
"typedoc": "^0.21.5",
171+
"typedoc": "0.21.2",
172172
"typescript": "^4.3.5",
173173
"yargs": "^15.3.1"
174174
},

0 commit comments

Comments
 (0)