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

Rethink :overwrite option #1

Closed
seancorfield opened this issue Aug 6, 2021 · 1 comment
Closed

Rethink :overwrite option #1

seancorfield opened this issue Aug 6, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@seancorfield
Copy link
Owner

Russell Mull on Slack:

My wish may be impossible: a way to change my mind about template options after the fact. Consider Luminus: (yes, it's a lein template) There are a bunch of choices that you have to make up front, but have no way to re-visit or re-examine later. We should be able to instantiate the basic thing, and then later add the "reagent" option (or whatever). I could imagine that this would only work if you haven't changed too much of the template, already.

Rick Moynahan replied:

I think modifying / integrating existing code whether it came from a template or not is going to be very awkward.
However I do think if it’s not already supported a way of overlaying new files into the same project may be worth while.
e.g. imagine you clj-new a minimal clojure project then later decide to add in your companies default circle ci template. Providing the file additions don’t intersect with code in the repo already that would be ok.

My response:

That's good feedback. I currently have it written to not overwrite an existing project, unless you say :overwrite true but, right now, that deletes any existing target directory first. I'll create an issue to rethink that.

@seancorfield seancorfield self-assigned this Aug 6, 2021
@seancorfield seancorfield added the question Further information is requested label Aug 6, 2021
@seancorfield
Copy link
Owner Author

I think a reasonable compromise here is to only delete the existing directory if :overwrite is :delete but to overlay the template onto the existing project if :overwrite is any other truth value (such as true). That makes the delete operation explicit while still allowing multiple templates to be overlaid on each other.

@seancorfield seancorfield added enhancement New feature or request and removed question Further information is requested labels Aug 7, 2021
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

No branches or pull requests

1 participant