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

feat: add overwrite option #54

Merged
merged 13 commits into from
May 12, 2023
Merged

Conversation

jaluik
Copy link
Contributor

@jaluik jaluik commented May 4, 2023

Hello, thanks for your great jobs!

In my case I need copy something and not to overwrite it. So I hope this vite plugin can expose fs-extra copy options to users. Thanks .

The fs-extra copy docs is here

@sapphi-red
Copy link
Owner

Thanks for the PR!
Would you implement the server part as well to make the behavior consistent? The current behavior will prioritize the copied one instead of the existing one even if the overwrite: false is set.
Also would you add a test for this?

@sapphi-red sapphi-red added the enhancement New feature or request label May 4, 2023
@jaluik
Copy link
Contributor Author

jaluik commented May 4, 2023

ok, I will handle this

@jaluik
Copy link
Contributor Author

jaluik commented May 10, 2023

I have added the test cases and change the server side logic to make sure that the overwrite config have consistent in vite server and build process @sapphi-red

@sapphi-red sapphi-red changed the title feat: add fs-extra copy options (overwrite & errorOnExist ) feat: add overwrite option May 12, 2023
@sapphi-red
Copy link
Owner

Thank you! I fixed one bug and refactored a bit. Also I merged overwrite and errorOnExist into one option as I didn't think we need two options.

@sapphi-red sapphi-red merged commit 0fb0f51 into sapphi-red:main May 12, 2023
@sapphi-red
Copy link
Owner

@jaluik I have released this as v0.15.0!

@jaluik jaluik deleted the add-fs-extra-options branch May 13, 2023 01:23
brunoimbrizi pushed a commit to brunoimbrizi/vite-plugin-static-copy that referenced this pull request May 30, 2023
Co-authored-by: sapphi-red <green@sapphi.red>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants