File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import * as webpack from "webpack";
44import ts from "typescript" ;
55import * as docGen from "react-docgen-typescript" ;
66import generateDocgenCodeBlock from "react-docgen-typescript-loader/dist/generateDocgenCodeBlock" ;
7- import match from "micromatch" ;
7+ import { matcher } from "micromatch" ;
88
99const debugExclude = createDebug ( "docgen:exclude" ) ;
1010const debugInclude = createDebug ( "docgen:include" ) ;
@@ -130,8 +130,11 @@ function getTSConfigFile(tsconfigPath: string): ts.ParsedCommandLine {
130130}
131131
132132/** Create a glob matching function. */
133- const matchGlob = ( globs : string [ ] ) => ( filename : string ) =>
134- Boolean ( filename && globs . find ( ( g ) => match ( [ filename ] , g ) . length ) ) ;
133+ const matchGlob = ( globs : string [ ] ) => {
134+ const matchers = globs . map ( ( g ) => matcher ( g ) ) ;
135+ return ( filename : string ) =>
136+ Boolean ( filename && matchers . find ( ( matcher ) => matcher ( filename ) ) ) ;
137+ } ;
135138
136139/** Inject typescript docgen information into modules at the end of a build */
137140export default class DocgenPlugin {
You can’t perform that action at this time.
0 commit comments