swaf/scripts/clean.js

13 lines
222 B
JavaScript

import fs from "fs";
[
'intermediates',
'dist',
'public',
].forEach(file => {
if (fs.existsSync(file)) {
console.log('Cleaning', file, '...');
fs.rmSync(file, {recursive: true});
}
});