Skip to content

Commit

Permalink
Update purge.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mazipan authored Oct 20, 2019
1 parent ae60b41 commit d8c759c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions purge.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ const namesToRemove = process.argv.slice(2);
const peoplesPath = path.join(__dirname, "peoples");

if (!namesToRemove.length) {
fs.readdirSync(peoplesPath).forEach(file =>
fs.unlinkSync(path.join(peoplesPath, file))
);
fs.readdirSync(peoplesPath).forEach(file => {
if (file.indexOf('mazipan.js') < 0) {
fs.unlinkSync(path.join(peoplesPath, file))
}
});

fs.rmdirSync(peoplesPath);
} else {
Expand Down

0 comments on commit d8c759c

Please sign in to comment.