From 24fc9ce3525a9d236bbee50478c3777744b780e3 Mon Sep 17 00:00:00 2001 From: hwangsihu Date: Sun, 28 Jul 2024 15:36:54 +0900 Subject: [PATCH] Update --- package.json | 3 +-- scripts/clean-no-log.js | 16 ---------------- scripts/clean.js | 3 --- 3 files changed, 1 insertion(+), 21 deletions(-) delete mode 100644 scripts/clean-no-log.js diff --git a/package.json b/package.json index f1fcfa31b..9e7b3ec02 100644 --- a/package.json +++ b/package.json @@ -5,12 +5,11 @@ "main": "dist/index.js", "type": "module", "scripts": { - "start": "npm run clean:no-log && node .", + "start": "npm run clean && node .", "db:push": "npx prisma db push", "db:migrate": "npx prisma migrate dev --name init", "build": "tsc --project tsconfig.json", "clean": "node ./scripts/clean.js && npm run build", - "clean:no-log": "node ./scripts/clean-no-log.js && npm run build", "lint": "biome lint --write src/", "format": "biome format --write src/" }, diff --git a/scripts/clean-no-log.js b/scripts/clean-no-log.js deleted file mode 100644 index d84287d97..000000000 --- a/scripts/clean-no-log.js +++ /dev/null @@ -1,16 +0,0 @@ -import { existsSync } from "node:fs"; -import { rm } from "node:fs/promises"; -import { resolve } from "node:path"; - -async function clean() { - try { - const path = resolve("dist"); - if (existsSync(path)) { - await rm(path, { recursive: true, force: true }); - } - } catch (error) { - process.exit(1); - } -} - -clean(); diff --git a/scripts/clean.js b/scripts/clean.js index 0d40b5fa8..e432f6d8b 100644 --- a/scripts/clean.js +++ b/scripts/clean.js @@ -3,14 +3,11 @@ import { rm } from "node:fs/promises"; import { resolve } from "node:path"; async function clean() { - console.log("Cleaning dist folder..."); try { const path = resolve("dist"); if (existsSync(path)) { await rm(path, { recursive: true, force: true }); - console.log("Dist folder has been cleaned"); } else { - console.log("Dist folder does not exist"); } } catch (error) { console.error("Error while cleaning dist folder:", error);