swaf/scripts/clean.js

13 lines
214 B
JavaScript

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