Remove use of shebang

- Removed shebang line from generate and clear scripts
- Added `.js` extension to generate and clear script files
- Updated scripts in `package.json` accordingly
This commit is contained in:
ruthvik 2022-09-18 08:44:44 +05:30
parent 4475438908
commit 6d912532de
3 changed files with 2 additions and 4 deletions

27
scripts/clear.js Normal file
View file

@ -0,0 +1,27 @@
const fs = require("fs");
const path = require("path");
const src_path = path.join(__dirname, "..", "src");
try {
fs.readdirSync(src_path).
filter(f => {
if (f.includes("day")) {
console.log("found", f);
return true;
}
console.log("ignoring", f);
return false;
}).
forEach(f => {
const file = path.join(src_path, f);
console.log("deleting", file);
fs.rmSync(file, {
recursive: true,
force: true,
});
});
} catch (e) { console.log(e); }