forked from svrjs/svrjs
Lint out the codebase.
This commit is contained in:
parent
8be7735e71
commit
eb0d30f307
1 changed files with 5 additions and 3 deletions
|
@ -4,9 +4,11 @@ function deleteFolderRecursive(path) {
|
||||||
if (fs.existsSync(path)) {
|
if (fs.existsSync(path)) {
|
||||||
fs.readdirSync(path).forEach(function (file) {
|
fs.readdirSync(path).forEach(function (file) {
|
||||||
const curPath = path + "/" + file;
|
const curPath = path + "/" + file;
|
||||||
if (fs.statSync(curPath).isDirectory()) { // recurse
|
if (fs.statSync(curPath).isDirectory()) {
|
||||||
|
// recurse
|
||||||
deleteFolderRecursive(curPath);
|
deleteFolderRecursive(curPath);
|
||||||
} else { // delete file
|
} else {
|
||||||
|
// delete file
|
||||||
fs.unlinkSync(curPath);
|
fs.unlinkSync(curPath);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Reference in a new issue