From 5d06b4ecf398f666323cb39928b1227e904c56dc Mon Sep 17 00:00:00 2001 From: Martin Jacobsen Date: Fri, 8 Mar 2019 17:06:36 +0100 Subject: [PATCH] Adds support for .mdx A very small change to include support for mdx-documents to make working with stuff like Docz easier. https://mdxjs.com/ https://www.docz.site/ --- src/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.js b/src/utils.js index 4e21a0c..a4565d7 100644 --- a/src/utils.js +++ b/src/utils.js @@ -38,7 +38,7 @@ export const isSingleFile = (path: string): boolean => { } export const getFiles = (cwd: string, componentName?: string): string[] => { - const extensions = '{js,ts,jsx,tsx,css,less,scss,sass,sss,json,md}' + const extensions = '{js,ts,jsx,tsx,css,less,scss,sass,sss,json,md,mdx}' const pattern = componentName ? `**/${componentName}{.,.*.}${extensions}` : `**/*.${extensions}` return glob.sync(pattern, { cwd, absolute: true, nodir: true }) }