Skip to content

Commit ffb351a

Browse files
committed
refactor: do not auto generate Configuration h2
1 parent dd5fd65 commit ffb351a

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/output.ts

+10-5
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ function replaceMarkdownDocsConfig(content: string, data: DocsData) {
9999
return content;
100100
}
101101

102-
103102
function replaceMarkdownDocsApi(content: string, data: DocsData) {
104103
const startOuterIndex = content.indexOf(API_START);
105104
if (startOuterIndex > -1) {
@@ -223,8 +222,6 @@ function methodsTable(data: DocsData, m: DocsInterfaceMethod) {
223222
function markdownConfig(data: DocsData) {
224223
const o: string[] = [];
225224
if (data.pluginConfigs) {
226-
o.push('## Configuration')
227-
o.push(``);
228225
data!.pluginConfigs!.forEach(c => {
229226
o.push(configInterfaceTable(data, c));
230227
o.push(buildExamples(c));
@@ -245,7 +242,11 @@ function buildExamples(c: DocsConfigInterface) {
245242
o.push(` "plugins": {`);
246243
o.push(` "${c.name}": {`);
247244
c.properties.forEach((p, i) => {
248-
o.push(` "${p.name}": ${p.tags.find(t => t.name === 'example')?.text}${i === c.properties.length - 1 ? '' : ','}`);
245+
o.push(
246+
` "${p.name}": ${p.tags.find(t => t.name === 'example')?.text}${
247+
i === c.properties.length - 1 ? '' : ','
248+
}`,
249+
);
249250
});
250251
o.push(` }`);
251252
o.push(` }`);
@@ -256,7 +257,11 @@ function buildExamples(c: DocsConfigInterface) {
256257
o.push(`In \`capacitor.config.ts\`:`);
257258
o.push(``);
258259
o.push(`\`\`\`ts`);
259-
o.push(`/// <reference types="@capacitor/${slugify(c.name.replace(/([a-z])([A-Z])/g, '$1 $2'))}" />`);
260+
o.push(
261+
`/// <reference types="@capacitor/${slugify(
262+
c.name.replace(/([a-z])([A-Z])/g, '$1 $2'),
263+
)}" />`,
264+
);
260265
o.push(``);
261266
o.push(`import { CapacitorConfig } from '@capacitor/cli';`);
262267
o.push(``);

0 commit comments

Comments
 (0)