hay-kot / scaffold

A cookie cutter alternative with in-project scaffolding for generating components, controllers, or other common code patterns.
https://hay-kot.github.io/scaffold/
MIT License
59 stars 7 forks source link

FR: preserve symlinks #220

Open alexeagle opened 1 month ago

alexeagle commented 1 month ago

My scaffold has a tools/ folder with a bunch of utilities, they are all symlinks to one script (because Bazel will fetch them behind-the-scenes)

(see https://github.com/aspect-build/aspect-workflows-template/tree/main/%7B%7B%20.ProjectSnake%20%7D%7D/tools)

When this is scaffolded in a new project, these become regular files. That's not desirable since my users ought to end up with symlinks, they don't want the content of these things to diverge over time.

Maybe symlinks could always be preserved, or there could be a new option for this? Thanks!

hay-kot commented 2 weeks ago

This sounds good for me! I'm not sure if this should be an option in the scaffold.yaml file or a command line flag. I'm thinking probably a command line flag?

Happy to accept a PR on this one, it might be some time before I can get to it.