From ba93e02a4e42682f3e5ac2fa3d943b2882840f3b Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Fri, 4 Oct 2024 13:17:14 -0400 Subject: [PATCH] wip --- packages/@tailwindcss-upgrade/src/index.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/packages/@tailwindcss-upgrade/src/index.ts b/packages/@tailwindcss-upgrade/src/index.ts index 528e7cc2b..c1977391b 100644 --- a/packages/@tailwindcss-upgrade/src/index.ts +++ b/packages/@tailwindcss-upgrade/src/index.ts @@ -172,16 +172,8 @@ async function run() { // Write all files to disk // 1. Unlink all files that are no longer needed go first // 2. Write them all sequentially - for (let sheet of stylesheets.sort((a, z) => { - if (a.unlink && !z.unlink) return -1 - if (!a.unlink && z.unlink) return 1 - return 0 - })) { - if (sheet.unlink) { - await fs.unlink(sheet.file!) - } else { - await fs.writeFile(sheet.file!, sheet.root!.toString()) - } + for (let sheet of stylesheets) { + await fs.writeFile(sheet.file!, sheet.root!.toString()) } success('Stylesheet migration complete.')