Skip to content

Commit

Permalink
feat(docz-core): add mdxExtensions to config
Browse files Browse the repository at this point in the history
  • Loading branch information
rakannimer committed Nov 27, 2019
1 parent 2512aa1 commit 77b84e8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions core/docz-core/src/config/argv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export interface Config extends Argv {
plugins: Plugin[]
themeConfig: ThemeConfig
themesDir: string
mdxExtensions: string[]
filterComponents: (files: string[]) => string[]
}

Expand Down
5 changes: 3 additions & 2 deletions core/docz-core/src/config/docz.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const toOmit = ['_', '$0', 'version', 'help']
export const doczRcBaseConfig = {
themeConfig: {},
themesDir: 'src',
mdxExtensions: ['md', 'mdx'],
docgenConfig: {},
menu: [],
plugins: [],
Expand All @@ -27,9 +28,9 @@ export const doczRcBaseConfig = {
],
filterComponents: (files: string[]) =>
files.filter(filepath => {
const isTestFile = /\.(test|spec)\.(js|jsx|ts|tsx)$/.test(filepath);
const isTestFile = /\.(test|spec)\.(js|jsx|ts|tsx)$/.test(filepath)
if (isTestFile) {
return false;
return false
}
const startsWithCapitalLetter = /\/([A-Z]\w*)\.(js|jsx|ts|tsx)$/.test(
filepath
Expand Down

0 comments on commit 77b84e8

Please sign in to comment.