Skip to content

Commit

Permalink
feat(docz-core): add config docgen ts resolver (#848)
Browse files Browse the repository at this point in the history
  • Loading branch information
ejuo authored and pedronauck committed May 8, 2019
1 parent 3726901 commit 82e8ee2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/docz-core/src/utils/docgen/typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,14 @@ const parseFiles = (files: string[], config: Config, tsconfig: string) => {
const val = propFilter && _.isFunction(propFilter) && propFilter(prop)
return !prop.parent.fileName.includes('node_modules') || Boolean(val)
},
componentNameResolver(exp: ts.Symbol, source: ts.SourceFile): any {
const componentNameResolver = config.docgenConfig.resolver
const val =
componentNameResolver &&
_.isFunction(componentNameResolver) &&
componentNameResolver(exp, source)
return val
},
}

loadFiles(files)
Expand Down

0 comments on commit 82e8ee2

Please sign in to comment.