Skip to content

Commit

Permalink
Lightweight files
Browse files Browse the repository at this point in the history
  • Loading branch information
minagishl committed Oct 27, 2024
1 parent ec47570 commit 8e0c7ea
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions scripts/rm.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import fs from "node:fs";
import path from "node:path";
const __dirname = path.dirname(new URL(import.meta.url).pathname);
const distPath = path.resolve(__dirname, "../dist");
fs.existsSync(distPath);
import { existsSync, rmSync } from "node:fs";
import { resolve, dirname } from "node:path";
const dirPath = resolve(dirname(new URL(import.meta.url).pathname), "../dist");
existsSync(dirPath)
? rmSync(dirPath, { recursive: true, force: true })
: console.log("Directory does not exist:", dirPath);

0 comments on commit 8e0c7ea

Please sign in to comment.