From df7616482b360e5407ac0ac3e1c848c224744d0d Mon Sep 17 00:00:00 2001 From: DuroCodes Date: Thu, 20 Jun 2024 23:16:01 -0400 Subject: [PATCH] fix: whoops forgot to change the postinstall script --- package.json | 2 +- setup.ts | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index c4e62c270..5cf9bf442 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "build": "astro check && astro build", "preview": "astro preview", "astro": "astro", - "postinstall": "bun run setup.mjs", + "postinstall": "bun run setup.ts", "lunaria:build": "lunaria build", "lunaria:preview": "lunaria preview" }, diff --git a/setup.ts b/setup.ts index 1e40fe3fc..af06c1a46 100644 --- a/setup.ts +++ b/setup.ts @@ -9,6 +9,7 @@ interface GitItem { branch?: string; folder?: string; install?: boolean; + degit?: boolean; } const gits: GitItem[] = [ @@ -26,6 +27,7 @@ const gits: GitItem[] = [ repo: "tools", folder: "packages", install: false, + degit: true, }, ]; @@ -40,6 +42,10 @@ for (const git of gits) { if (git.folder) { await $`mv ${git.name}/${git.folder}/* ${git.name} && rm -rf ${git.name}/${git.folder}`; } + + if (git.degit) { + await $`find ${git.name} -name ".git" -type d -exec rm -rf {} +`; + } } const tools = (await $`ls -d tools/* | grep -v .github`.text())