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

Add transform option to plugin #113

Open
darthgoldstein opened this issue Aug 14, 2024 · 1 comment
Open

Add transform option to plugin #113

darthgoldstein opened this issue Aug 14, 2024 · 1 comment

Comments

@darthgoldstein
Copy link

The idea here is to make the plugin a bit more robust by the allowing the user of the plugin to transform the file along the way when copying.

The way I envision this field is that its value will be a callback with the file file path and content as its parameters. It will return the content that will be copied to the to destination.

{
    from: string;
    to: string;
    transform: (fromPathResolved: string, fileContent: Buffer) => string | Buffer;
}
@darthgoldstein
Copy link
Author

I opened a pull request for this feature. Please take a look and give me some feedback.

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

No branches or pull requests

1 participant