Closed caligo-erik closed 5 years ago
I think this is a great idea, especially the "don't overwrite flag". The only thing I don't like about the first idea is the "auto" directory because that conditions the structure of the template when it shouldn't. What about passing another flag with a list of directories you want to "empty" each time? You could have something like this:
og -o ./my-docs --rm the-dumb-code --rm the-other-dumb-code-directory --no-overwrite services/* openapi.yaml express
What do you think?
I think this is a great idea, especially the "don't overwrite flag". The only thing I don't like about the first idea is the "auto" directory because that conditions the structure of the template when it shouldn't. What about passing another flag with a list of directories you want to "empty" each time? You could have something like this:
og -o ./my-docs --rm the-dumb-code --rm the-other-dumb-code-directory --no-overwrite services/* openapi.yaml express
What do you think?
I'd prefer the recursive delete-folder feature, since it requires less maintenance effort. The delete parameter is specified only once and can be copied to other projects without any problems. This makes it easy to impose as a standard for your dev team.
I see it less a conditioning of the structure and more of a providing useful information such as: "you are about to edit code that is likely to be overwritten. Go away. Nothing important happens here." Example:
Fixed in #17. Thanks!
First of all: great tool, I am using it for a new project of mine and these "dynamic templates" are really helpful.
To make this tool even greater, I'd suggest the following features:
This is what I want to achieve with the suggested features:
routes/auto/$$path$$.js
will be overwritten each timeservices/$$path$$.js
will be written, but not overwritten.Advantages: