Skip to content

Conversation

@danielbayley
Copy link
Contributor

@danielbayley danielbayley commented Jan 29, 2025

This wraps the given templateFilter function, simplifying things so that the first source path iteration is not the directory itself. Otherwise, the package consumer is forced to always write extra logic, just to account for this… For example—something like:

const source = import.meta.dirname
const templateFilter = path => path !== source && path.endsWith(".ext")
const fixture = await createFixture(source, { templateFilter })

vs

const templateFilter = path => path.endsWith(".ext")

@privatenumber
Copy link
Owner

Looks good but seems like a breaking change. Will hold for a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants