Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Make fileExtensions configurable #22

Merged
merged 4 commits into from
Aug 21, 2019
Merged

Make fileExtensions configurable #22

merged 4 commits into from
Aug 21, 2019

Conversation

jescalan
Copy link
Contributor

@jescalan jescalan commented Aug 20, 2019

This is a duplicate of #20, but based off a branch so I could contribute to it. I fixed a number of bugs in the original code and added test coverage for the feature - happy with where it's at right now. Thank you @nfagerlund for the contribution!

Closes #19

nfagerlund and others added 4 commits August 20, 2019 14:27
This commit adds a new `fileExtensions` option, which specifies an array of
extensions that should be processed as MDX pages. It defaults to only processing
`.mdx` files.
@jescalan jescalan requested a review from nfagerlund August 20, 2019 19:21
pattern: '**/*.mdx',
pattern:
pluginOptions.fileExtensions.length > 1
? `**/*.{${pluginOptions.fileExtensions.join(',')}}`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh huh, does that extended glob syntax misbehave if there's only one thing in it? Or is there another reason for separating them?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, it didn't work with only one item - you can test it here - thank goodness for tests!

Copy link
Member

@nfagerlund nfagerlund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you for handling the tests!

@jescalan jescalan merged commit a60a645 into master Aug 21, 2019
@jescalan jescalan deleted the pr-20 branch August 21, 2019 16:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Supports .md files?
2 participants