donmccurdy / glTF-Transform

glTF 2.0 SDK for JavaScript and TypeScript, on Web and Node.js.
https://gltf-transform.dev
MIT License
1.43k stars 150 forks source link

Cache cleanup #1368

Closed marwie closed 7 months ago

marwie commented 7 months ago

Hey,

I just noticed that the gltf-transform temp directory has grown to 1.2 GB by now and I wonder if files could automatically be removed or cleaned up after a run since - if I remember correctly - they're not used anymore later (e.g. as a cache)

image

donmccurdy commented 7 months ago

Yikes. Cleanup was intended to happen...

https://github.com/donmccurdy/glTF-Transform/blob/46a74055d829c8e15b001c3ff55952e0dd1966d0/packages/cli/src/transforms/toktx.ts#L30

... but it looks like I may not be using that feature of tmp correctly. I'll retag this as a bug.

donmccurdy commented 7 months ago

I also really want to avoid using CLI-in-CLI like this, per #675, but no progress there.