UNPKG

enka-network-api

Version:

Enka-network API wrapper for Genshin Impact.

17 lines (15 loc) 354 B
const fs = require("fs"); if (fs.existsSync("dist")) { deleteFiles("dist"); } function deleteFiles(path) { const target = fs.statSync(path); if (!target.isDirectory()) { fs.unlinkSync(path); return; } const files = fs.readdirSync(path); for (const file of files) { deleteFiles(path + "/" + file); } }