@@ -2,6 +2,7 @@ import {Package} from 'dgeni';
2
2
import { DocsPrivateFilter } from './processors/docs-private-filter' ;
3
3
import { Categorizer } from './processors/categorizer' ;
4
4
import { FilterExportAliases } from './processors/filter-export-aliases' ;
5
+ import { MergeInheritedProperties } from './processors/merge-inherited-properties' ;
5
6
import { ComponentGrouper } from './processors/component-grouper' ;
6
7
import { ReadTypeScriptModules } from 'dgeni-packages/typescript/processors/readTypeScriptModules' ;
7
8
import { TsParser } from 'dgeni-packages/typescript/services/TsParser' ;
@@ -51,6 +52,9 @@ export const apiDocsPackage = new Package('material2-api-docs', dgeniPackageDeps
51
52
// Processor that filters out aliased exports that should not be shown in the docs.
52
53
apiDocsPackage . processor ( new FilterExportAliases ( ) ) ;
53
54
55
+ // Processor that merges inherited properties of a class with the class doc.
56
+ apiDocsPackage . processor ( new MergeInheritedProperties ( ) ) ;
57
+
54
58
// Processor that filters out symbols that should not be shown in the docs.
55
59
apiDocsPackage . processor ( new DocsPrivateFilter ( ) ) ;
56
60
@@ -99,8 +103,14 @@ apiDocsPackage.config((readTypeScriptModules: ReadTypeScriptModules, tsParser: T
99
103
typescriptPathMap [ `@angular/cdk/${ packageName } ` ] = [ `./cdk/${ packageName } /index.ts` ] ;
100
104
} ) ;
101
105
102
- tsParser . options . baseUrl = sourceDir ;
106
+ materialPackages . forEach ( packageName => {
107
+ typescriptPathMap [ `@angular/material/${ packageName } ` ] = [ `./lib/${ packageName } /index.ts` ] ;
108
+ } ) ;
109
+
110
+ // Add proper path mappings to the TSParser service of Dgeni. This ensures that properties
111
+ // from mixins (e.g. color, disabled) are showing up properly in the docs.
103
112
tsParser . options . paths = typescriptPathMap ;
113
+ tsParser . options . baseUrl = sourceDir ;
104
114
105
115
// Entry points for docs generation. All publically exported symbols found through these
106
116
// files will have docs generated.
0 commit comments