3DS-RPC/templates/scripts/clean.js
Spotlight 1fa2402d0a
Migrate client into 3DS-RPC/3DS-RPC-Desktop
Minimal changes have been to flatten the `server/` subdirectory to the root of the repository. More testing will be required.
2025-04-03 22:06:10 -05:00

13 lines
306 B
JavaScript

import fs from "fs/promises";
const destPath = new URL("../dist", import.meta.url);
// Only delete if the directory exists.
let destExists = fs.access(destPath, fs.constants.F_OK)
.then(() => true)
.catch(() => false);
if (destExists == true) {
await fs.rm(destPath, { recursive: true });
}