mirror of
https://github.com/MCMi460/3DS-RPC.git
synced 2025-06-19 14:05:41 -04:00

Minimal changes have been to flatten the `server/` subdirectory to the root of the repository. More testing will be required.
13 lines
306 B
JavaScript
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 });
|
|
}
|