vseventer / sharp-cli

CLI for sharp.
MIT License
189 stars 20 forks source link

Option to delete original? #71

Open Nantris opened 2 years ago

Nantris commented 2 years ago

I know you can use {dir} to overwrite the original, but that can't help if the operation is a conversion from, for example, png to jpg.

Thanks for sharing this great project!

vseventer commented 2 years ago

I don't think the CLI should be removing files - you can always write a script that takes the input file and deletes it after processing.

Nantris commented 2 years ago

Fair enough. I'd hoped not to have to do that, but it's an understandable position.

One substantial downside though is that it makes testing commands much more onerous because it means cleaning up files in {dir} or re-creating {dir} to its proper state before testing the command again.

Thanks for all your help and feel free to close this issue unless that downside sways you at all.

mathieu-aubin commented 1 year ago

do your testing in a git managed folder you quickly setup and then just do a hard reset on the repository to clean up? no? It's quick. rm -rf $tmpDir is also quick.