Script to clean release directory

You can now do npm run clean:buildDir, ... clean:releaseDir, or just
... clean, which does both.

The release directory is automatically cleaned before packaging
commences.
This commit is contained in:
Christopher Allen
2021-06-23 13:07:20 +01:00
parent 961319b3eb
commit e8eb30fa8b
4 changed files with 44 additions and 25 deletions

View File

@@ -559,8 +559,7 @@ function cleanBuildDir(done) {
if (BUILD_DIR === '.' || BUILD_DIR === '/') {
throw new Error(`Refusing to rm -rf ${BUILD_DIR}`);
}
rimraf.sync(BUILD_DIR);
done();
rimraf(BUILD_DIR, done);
}
module.exports = {