c8 icon indicating copy to clipboard operation
c8 copied to clipboard

use fs.rmdir recursive

Open jimmywarting opened this issue 5 years ago • 1 comments

This... https://github.com/bcoe/c8/blob/a465b65d907b669714cfc3dca949efd667f499c3/bin/c8.js#L32 could possible be replaced by:

await fs.fsPromises.rmdir(argv.tempDirectory, { recursive: true })

if not now, then maybe in the feature when you decide to drop support for < 12.10

(only looking into all my sub dependencies seeing if there is anyway to reduce the total size)

jimmywarting avatar Sep 02 '20 20:09 jimmywarting

fs.rmdirSync is easier and less hassle (there's no reason it needs to be async in the [blocking] cli use-case). the same goes for the test-cases

fs.rmdirSync(argv.tempDirectory, { recursive: true });

kaizhu256 avatar Nov 20 '20 07:11 kaizhu256