kevva / bin-build

Easily build binaries
MIT License
38 stars 13 forks source link

Remove decompressed file after build #19

Closed aprat84 closed 4 years ago

aprat84 commented 5 years ago

Would it be possible, in case of binBuild.url and binBuild.file to remove temp dir after all operations are done?

I'm trying to package a AWS Lambda function, which uses cwebp-bin library, and the difference between removing or not this temp directory is ~15MB final ZIP size. And in this case, the smaller the ZIP is, the better.

Thanks!

ogonkov commented 4 years ago

You can remove temp dir itself.

Set TMPDIR env var to control which dir would be used.

aprat84 commented 4 years ago

This doesn't solve the issue that some temp files are left behind.

IMHO it should be as easy as appending a .then(...) and remove everything in tmp

ogonkov commented 4 years ago

Temp files is OK, when you need to speedup CI build for example (although this library didn't reuse them, but that another story).

You can send PR that add some kind of noCache flag and removes tmp files.

aprat84 commented 4 years ago

Nevermind, this project looks abandoned and @kevva apparently just disappeared.

Hope some up-to-date fork or new library arises.