[ADF-1586] Updated doc indexing to include pipes (#2482)

This commit is contained in:
Andy Stark
2017-10-17 11:41:07 +01:00
committed by Eugenio Romano
parent 3023d30d38
commit 0e80f0ab8a
2 changed files with 21 additions and 4 deletions

View File

@@ -326,6 +326,14 @@ for more information about installing and using the source code.
- [*Card view content proxy directive](../ng2-components/ng2-alfresco-core/src/components/view/card-view-content-proxy.directive.ts)
- [*Highlight directive](../ng2-components/ng2-alfresco-core/src/directives/highlight.directive.ts)
### Pipes
- [*File size pipe](../ng2-components/ng2-alfresco-core/src/pipes/file-size.pipe.ts)
- [*Mime type icon pipe](../ng2-components/ng2-alfresco-core/src/pipes/mime-type-icon.pipe.ts)
- [*Text highlight pipe](../ng2-components/ng2-alfresco-core/src/pipes/text-highlight.pipe.ts)
- [*Time ago pipe](../ng2-components/ng2-alfresco-core/src/pipes/time-ago.pipe.ts)
- [*User initial pipe](../ng2-components/ng2-alfresco-core/src/pipes/user-initial.pipe.ts)
### Services
- [Alfresco api service](alfresco-api.service.md)
@@ -548,6 +556,8 @@ for more information about installing and using the source code.
- [*PdfViewer component](../ng2-components/ng2-alfresco-viewer/src/components/pdfViewer.component.ts)
- [*TxtViewer component](../ng2-components/ng2-alfresco-viewer/src/components/txtViewer.component.ts)
- [*Unknown format component](../ng2-components/ng2-alfresco-viewer/src/components/unknown-format/unknown-format.component.ts)
- [*Viewer info drawer component](../ng2-components/ng2-alfresco-viewer/src/components/viewer-info-drawer.component.ts)
- [*Viewer toolbar component](../ng2-components/ng2-alfresco-viewer/src/components/viewer-toolbar.component.ts)
### Directives

View File

@@ -1,7 +1,7 @@
var fs = require('fs');
var path = require('path');
var angFilenameRegex = /([a-zA-Z0-9\-]+)\.((component)|(directive)|(model)|(service)|(widget))\.ts/;
var angFilenameRegex = /([a-zA-Z0-9\-]+)\.((component)|(directive)|(model)|(pipe)|(service)|(widget))\.ts/;
var indexFileName = path.resolve('..', 'docs', 'README.md');
var summaryFileName = path.resolve('..', 'docs', 'summary.json');
@@ -36,6 +36,10 @@ function searchLibraryRecursive(libData, folderPath) {
libData.modelsWithDocs.push(itemPath);
break;
case "pipe":
libData.pipesWithDocs.push(itemPath);
break;
case "service":
libData.servicesWithDocs.push(itemPath);
break;
@@ -60,6 +64,10 @@ function searchLibraryRecursive(libData, folderPath) {
case "model":
libData.modelsWithoutDocs.push(itemPath);
break;
case "pipe":
libData.pipesWithoutDocs.push(itemPath);
break;
case "service":
libData.servicesWithoutDocs.push(itemPath);
@@ -191,12 +199,10 @@ for (var i = 0; i < rootItems.length; i++) {
componentsWithDocs: [], componentsWithoutDocs: [],
directivesWithDocs: [], directivesWithoutDocs: [],
modelsWithDocs: [], modelsWithoutDocs: [],
pipesWithDocs: [], pipesWithoutDocs: [],
servicesWithDocs: [], servicesWithoutDocs: [],
widgetsWithDocs: [], widgetsWithoutDocs: [],
};
//var itemsWithDocs = libs[rootItems[i]].componentsWithDocs;
//var itemsWithoutDocs = libs[rootItems[i]].componentsWithoutDocs;
searchLibraryRecursive(libs[rootItems[i]], path.resolve(itemPath, 'src'));
}
@@ -213,6 +219,7 @@ for (var i = 0; i < libNames.length; i++) {
var listItems = buildIndexSection('Components', libData.componentsWithDocs, libData.componentsWithoutDocs);
listItems = listItems.concat(buildIndexSection('Directives', libData.directivesWithDocs, libData.directivesWithoutDocs));
listItems = listItems.concat(buildIndexSection('Models', libData.modelsWithDocs, libData.modelsWithoutDocs));
listItems = listItems.concat(buildIndexSection('Pipes', libData.pipesWithDocs, libData.pipesWithoutDocs));
listItems = listItems.concat(buildIndexSection('Services', libData.servicesWithDocs, libData.servicesWithoutDocs));
listItems = listItems.concat(buildIndexSection('Widgets', libData.widgetsWithDocs, libData.widgetsWithoutDocs));