@tinymce/moxiedoc
Advanced tools
Comparing version 0.2.2-feature.20220818053235171.sha2435fdb to 0.2.2-feature.20220822040035676.sha7c8e0bf
@@ -34,8 +34,8 @@ "use strict"; | ||
const title = getTitleFromFullName(name); | ||
const fileName = name.toLowerCase() + '.adoc'; | ||
const fileName = name.toLowerCase() === 'tinymce' ? getRootPath(structure) : name.toLowerCase(); | ||
switch (structure) { | ||
case 'legacy': | ||
return generateNavXref('api/' + getNamespaceFromFullName(name.toLowerCase()), fileName, title); | ||
return generateNavXref('api/' + getNamespaceFromFullName(name.toLowerCase()), fileName + '.adoc', title); | ||
case 'default': | ||
return generateNavXref('apis/', fileName, title); | ||
return generateNavXref('apis', fileName + '.adoc', title); | ||
} | ||
@@ -57,3 +57,3 @@ }; | ||
case 'default': | ||
return BASE_PATH + '/apis/' + fileName + '.adoc'; | ||
return BASE_PATH + '/' + fileName + '.adoc'; | ||
} | ||
@@ -166,3 +166,3 @@ }; | ||
if (namespace.pages) { | ||
indexPageLines.push('[cols="1,1"]\n', '|===\n\n', 'a|\n\n', '|==='); | ||
indexPageLines.push('[cols="1,2",options="header"]\n', '|===\n', '|API|Summary\n\n'); | ||
namespace.pages.forEach((pageFile) => { | ||
@@ -172,3 +172,3 @@ keywords.push(getNameFromFullName(pageFile.title)); | ||
indexPageLines.push('[.lead]\n'); | ||
indexPageLines.push(pageFileLine(pageFile, structure) + '\n'); | ||
indexPageLines.push(pageFileLine(pageFile, structure) + ' |\n'); | ||
const description = descriptions[pageFile.path]; | ||
@@ -178,2 +178,3 @@ indexPageLines.push(description + '\n\n'); | ||
} | ||
indexPageLines.push('|===\n'); | ||
const data = { | ||
@@ -180,0 +181,0 @@ fullName: namespace.title, |
{ | ||
"name": "@tinymce/moxiedoc", | ||
"version": "0.2.2-feature.20220818053235171.sha2435fdb", | ||
"version": "0.2.2-feature.20220822040035676.sha7c8e0bf", | ||
"description": "A tool for generating API documentation", | ||
@@ -5,0 +5,0 @@ "author": "Tiny Technologies, Inc", |
@@ -61,9 +61,9 @@ import * as fs from 'fs'; | ||
const title = getTitleFromFullName(name); | ||
const fileName = name.toLowerCase() + '.adoc'; | ||
const fileName = name.toLowerCase() === 'tinymce' ? getRootPath(structure) : name.toLowerCase(); | ||
switch (structure) { | ||
case 'legacy': | ||
return generateNavXref('api/' + getNamespaceFromFullName(name.toLowerCase()), fileName, title); | ||
return generateNavXref('api/' + getNamespaceFromFullName(name.toLowerCase()), fileName + '.adoc', title); | ||
case 'default': | ||
return generateNavXref('apis/', fileName, title); | ||
return generateNavXref('apis', fileName + '.adoc', title); | ||
} | ||
@@ -87,3 +87,3 @@ }; | ||
case 'default': | ||
return BASE_PATH + '/apis/' + fileName + '.adoc'; | ||
return BASE_PATH + '/' + fileName + '.adoc'; | ||
} | ||
@@ -209,6 +209,5 @@ }; | ||
indexPageLines.push( | ||
'[cols="1,1"]\n', | ||
'|===\n\n', | ||
'a|\n\n', | ||
'|===' | ||
'[cols="1,2",options="header"]\n', | ||
'|===\n', | ||
'|API|Summary\n\n' | ||
); | ||
@@ -219,8 +218,8 @@ namespace.pages.forEach((pageFile) => { | ||
indexPageLines.push('[.lead]\n'); | ||
indexPageLines.push(pageFileLine(pageFile, structure) + '\n'); | ||
indexPageLines.push(pageFileLine(pageFile, structure) + ' |\n'); | ||
const description = descriptions[pageFile.path]; | ||
indexPageLines.push(description + '\n\n'); | ||
}); | ||
} | ||
indexPageLines.push('|===\n'); | ||
const data = { | ||
@@ -227,0 +226,0 @@ fullName: namespace.title, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
366097
6930