Skip to content

Commit 584720f

Browse files
committed
add build steps automation
1 parent 6c64934 commit 584720f

File tree

4 files changed

+346
-70
lines changed

4 files changed

+346
-70
lines changed

cleanup.cjs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
const fs = require("fs");
2+
const path = require("path");
3+
4+
const currentDir = path.dirname(require.main.filename);
5+
6+
function deleteFolderRecursive(path) {
7+
if (fs.existsSync(path) && fs.lstatSync(path).isDirectory()) {
8+
fs.readdirSync(path).forEach(function (file, index) {
9+
var curPath = path + "/" + file;
10+
11+
if (fs.lstatSync(curPath).isDirectory()) { // recurse
12+
deleteFolderRecursive(curPath);
13+
} else { // delete file
14+
fs.unlinkSync(curPath);
15+
}
16+
});
17+
18+
console.log(`Deleting directory "${path}"...`);
19+
fs.rmdirSync(path);
20+
}
21+
}
22+
23+
deleteFolderRecursive(`${currentDir}\\node_modules\\vue-data-ui`);
24+
deleteFolderRecursive(`${currentDir}\\node_modules\\.vite`);
25+
deleteFolderRecursive('dist');

0 commit comments

Comments
 (0)