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

Added ability to skip generating of existing files #447

Merged
merged 1 commit into from
Jun 27, 2022

Conversation

psynomorph
Copy link
Contributor

Added the ability to skip recreating and overwriting already existing files by passing a special argument to the tool.

@psynomorph
Copy link
Contributor Author

psynomorph commented Jun 17, 2022

I'm using Mapster only for generating static mappers and extension methods. Sometimes I need to edit generated mappers to add more complex mapping logic in concrete mapper. Unfortunately Mapster tool rewrites all generated files on each run. In order to generate new mappers, I have to copy the old ones to another location so they don't get overwritten.
I thought it would be nice to have ability to generate mappers and extensions only for new models and interfaces.

@andrerav andrerav merged commit 7c76b59 into MapsterMapper:master Jun 27, 2022
@andrerav
Copy link
Contributor

Thank you very much @psynomorph! I have updated the Wiki here to reflect this new functionality: https://github.com/MapsterMapper/Mapster/wiki/Mapster.Tool

@andrerav
Copy link
Contributor

This is now available in the latest pre-release package.

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