Cleanup directories.
npm install @mstssk/cleandir!Test

cleandir just empty output directories.
- Single purpose and feature.
- Empty compiler's output directories.
- Remain specified top directory.
- .gitkeep and .keep is also remained.
- Very tiny!
- No dependencies.
Inspired by https://stackoverflow.com/a/57866165
```
$ npm install --save-dev @mstssk/cleandir
You can install from GitHub Package.
See a package page and GitHub Package document.
- Package: https://github.com/mstssk/cleandir/packages/285984
- Document: https://help.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-npm-for-use-with-github-packages#installing-a-package
In npm-run-script:
`json`
// package.json
{
"scripts": {
"prebuild": "cleandir dist/",
"build": "tsc"
}
}
In your code:
`js
const { cleandir } = require("@mstssk/cleandir");
(async function () {
await cleandir(dirPaths);
})();
``
I recommend to use rimraf, if you want conditional deleting.
See https://github.com/mstssk/cleandir/releases