generate-template-files icon indicating copy to clipboard operation
generate-template-files copied to clipboard

Prompt confirmation before files are written

Open marksmccann opened this issue 4 years ago • 1 comments

Just an idea, but one potential feature that could be really handy is a confirmation step that optionally occurs before the files are written; similar to how npm init does it:

Screen Shot 2020-12-12 at 9 18 03 AM

This would give consumers the ability to see what files are going to be generated, and the ability to bail out if they entered something incorrectly OR might accidentally overwrite something they don't intend to. It will add a little transparency to each option and what it does, which can be very reassuring.

This could easily be an opt-in or opt-out feature by adding it to the API:

{
    option: 'Create Redux Store',
    defaultCase: '(pascalCase)',
    confirmFiles: true, // <-- opt-in
},

Are you open to contributions? I am interested in taking a stab at adding this feature, if you agree it is a feature worth pursuing. Thanks!

marksmccann avatar Dec 12 '20 15:12 marksmccann

sure, go ahead and submit a pr

codeBelt avatar Apr 22 '21 13:04 codeBelt