@tinymce/moxiedoc
Advanced tools
Comparing version 0.2.2-feature.20220712010039247.sha1f5d4f4 to 0.2.2-feature.20220712011522719.sha74174c7
@@ -29,10 +29,15 @@ "use strict"; | ||
}; | ||
const namespaceNavToAdoc = (namespace) => { | ||
let adoc = navLine(namespace.title, 1); | ||
const indexToAdoc = (namespace) => { | ||
let adoc = '= ' + namespace.title + '\n\n'; | ||
adoc += '[cols="1,1"]\n'; | ||
adoc += '|===\n\n'; | ||
if (namespace.pages) { | ||
namespace.pages.forEach((pageFile) => { | ||
const namespaceLine = generateXref('api/' + namespace.path, pageFile.path + '.adoc', pageFile.title); | ||
adoc += navLine(namespaceLine, 2); | ||
adoc += 'a|\n'; | ||
adoc += '[.lead]\n'; | ||
adoc += generateXref('api/' + namespace.path, pageFile.path + '.adoc', pageFile.title) + '\n\n'; | ||
}); | ||
} | ||
adoc += 'a|\n\n'; | ||
adoc += '|==='; | ||
return adoc; | ||
@@ -253,4 +258,4 @@ }; | ||
addPage({ | ||
filename: 'api/' + namespace.path + '/' + namespace.path + '_nav.adoc', | ||
content: namespaceNavToAdoc(namespace) | ||
filename: 'api/' + namespace.path + '/index_' + namespace.path + '.adoc', | ||
content: indexToAdoc(namespace) | ||
}); | ||
@@ -257,0 +262,0 @@ }); |
{ | ||
"name": "@tinymce/moxiedoc", | ||
"version": "0.2.2-feature.20220712010039247.sha1f5d4f4", | ||
"version": "0.2.2-feature.20220712011522719.sha74174c7", | ||
"description": "A tool for generating API documentation", | ||
@@ -5,0 +5,0 @@ "author": "Tiny Technologies, Inc", |
@@ -43,10 +43,15 @@ import * as fs from 'fs'; | ||
const namespaceNavToAdoc = (namespace: NavFile): string => { | ||
let adoc = navLine(namespace.title, 1); | ||
const indexToAdoc = (namespace: NavFile): string => { | ||
let adoc = '= ' + namespace.title + '\n\n'; | ||
adoc += '[cols="1,1"]\n'; | ||
adoc += '|===\n\n'; | ||
if (namespace.pages) { | ||
namespace.pages.forEach((pageFile) => { | ||
const namespaceLine = generateXref('api/' + namespace.path, pageFile.path + '.adoc', pageFile.title); | ||
adoc += navLine(namespaceLine, 2); | ||
adoc += 'a|\n'; | ||
adoc += '[.lead]\n'; | ||
adoc += generateXref('api/' + namespace.path, pageFile.path + '.adoc', pageFile.title) + '\n\n'; | ||
}); | ||
} | ||
adoc += 'a|\n\n'; | ||
adoc += '|==='; | ||
return adoc; | ||
@@ -299,4 +304,4 @@ }; | ||
addPage({ | ||
filename: 'api/' + namespace.path + '/' + namespace.path + '_nav.adoc', | ||
content: namespaceNavToAdoc(namespace) | ||
filename: 'api/' + namespace.path + '/index_' + namespace.path + '.adoc', | ||
content: indexToAdoc(namespace) | ||
}); | ||
@@ -303,0 +308,0 @@ }); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
353253
6741