Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide full src path to transform #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

floryst
Copy link

@floryst floryst commented Sep 28, 2021

Instead of passing in just the basename of the source file, pass in the full src path.
This is useful when needing to rewrite contents that contain relative references to other files.

Instead of passing in just the basename of the source file, pass in the full src path.
This is useful when needing to rewrite contents that contain relative references to other files.
@aperron
Copy link

aperron commented Nov 29, 2021

I need this too.

To avoid regressions, maybe
...(transform && { contents: await transform(await fs.readFile(src), base, src) }),
OR
...(transform && { contents: await transform(await fs.readFile(src), base, dir) }),

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.

None yet

2 participants