mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2463] Update doc tools to work with subfolders (#3056)
* [ADF-2463] Updated main doc tool and index tool to handle subfolders * [ADF-2463] Updated version index tool for subfolders
This commit is contained in:
committed by
Eugenio Romano
parent
16a8fa8cd8
commit
4ee7cc0870
@@ -39,7 +39,7 @@ function initPhase(aggData) {
|
||||
aggData.srcData = {};
|
||||
aggData.mdFileDesc = [];
|
||||
aggData.mdFileStatus = [];
|
||||
|
||||
aggData.mdFilePath = [];
|
||||
searchLibraryRecursive(aggData.srcData, path.resolve(rootFolder));
|
||||
|
||||
//console.log(JSON.stringify(aggData.srcData));
|
||||
@@ -50,7 +50,7 @@ function readPhase(tree, pathname, aggData) {
|
||||
var itemName = path.basename(pathname, ".md");
|
||||
|
||||
// Look for the first paragraph in the file by skipping other items.
|
||||
// Should usually be a position 1 in the tree.
|
||||
// Should usually be at position 1 in the tree.
|
||||
var s;
|
||||
var briefDesc;
|
||||
|
||||
@@ -80,6 +80,10 @@ function readPhase(tree, pathname, aggData) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var linkPath = pathname.replace(/\\/g, '/');
|
||||
linkPath = linkPath.substr(linkPath.indexOf("docs") + 5);
|
||||
aggData.mdFilePath[itemName] = linkPath;
|
||||
}
|
||||
|
||||
function aggPhase(aggData) {
|
||||
@@ -159,6 +163,7 @@ function prepareIndexSections(aggData) {
|
||||
var briefDesc = aggData.mdFileDesc[itemName];
|
||||
|
||||
var displayName = ngHelpers.ngNameToDisplayName(itemName);
|
||||
var pathname = aggData.mdFilePath[itemName];
|
||||
|
||||
var status = "";
|
||||
|
||||
@@ -169,6 +174,7 @@ function prepareIndexSections(aggData) {
|
||||
sections[libName][srcData.type].documented.push({
|
||||
"displayName": displayName,
|
||||
"mdName": itemName + ".md",
|
||||
"mdPath": pathname,
|
||||
"srcPath": srcData.path,
|
||||
"briefDesc": briefDesc,
|
||||
"status": status
|
||||
@@ -280,7 +286,7 @@ function makeMDUndocumentedListItem(docItem) {
|
||||
|
||||
|
||||
function makeMDDocumentedTableRow(docItem) {
|
||||
var mdFileLink = unist.makeLink(unist.makeText(docItem.displayName), docItem.mdName);
|
||||
var mdFileLink = unist.makeLink(unist.makeText(docItem.displayName), docItem.mdPath);
|
||||
var srcFileLink = unist.makeLink(unist.makeText("Source"), "../lib/" + docItem.srcPath);
|
||||
var desc = docItem.briefDesc;
|
||||
|
||||
|
Reference in New Issue
Block a user