From 0e80f0ab8ac220ef0d7f6fff6b5d5d9e9a59e5c6 Mon Sep 17 00:00:00 2001 From: Andy Stark <30621568+therealandeeee@users.noreply.github.com> Date: Tue, 17 Oct 2017 11:41:07 +0100 Subject: [PATCH] [ADF-1586] Updated doc indexing to include pipes (#2482) --- docs/README.md | 10 ++++++++++ ng2-components/config/buildFullDocIndex.js | 15 +++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/docs/README.md b/docs/README.md index b6dfd2f24d..2a54c85de0 100644 --- a/docs/README.md +++ b/docs/README.md @@ -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 diff --git a/ng2-components/config/buildFullDocIndex.js b/ng2-components/config/buildFullDocIndex.js index d5fa9a4c8e..4bfe8adb91 100644 --- a/ng2-components/config/buildFullDocIndex.js +++ b/ng2-components/config/buildFullDocIndex.js @@ -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));