From 389ecc526288acb4c67689b060ee3b3336a3381b Mon Sep 17 00:00:00 2001 From: Pedro Sousa <680496+pedrosousa@users.noreply.github.com> Date: Tue, 22 Jul 2025 15:36:21 +0100 Subject: [PATCH] [Docs] Fix component/partial usage on Windows --- src/util/components.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/util/components.ts b/src/util/components.ts index 2db0f5e830ad381..7a613f4932e72c1 100644 --- a/src/util/components.ts +++ b/src/util/components.ts @@ -33,7 +33,11 @@ export async function getComponentsUsage( ); for (const file of files) { - const fullName = file.parentPath + "/" + file.name; + const parentPath = + process.platform === "win32" + ? file.parentPath.replaceAll("\\", "/") + : file.parentPath; + const fullName = parentPath + "/" + file.name; const content = await readFile(fullName, "utf8"); if (!content.includes("import")) continue; @@ -85,7 +89,11 @@ export async function getPartialsUsage(): Promise> { ); for (const file of files) { - const fullName = file.parentPath + "/" + file.name; + const parentPath = + process.platform === "win32" + ? file.parentPath.replaceAll("\\", "/") + : file.parentPath; + const fullName = parentPath + "/" + file.name; const content = await readFile(fullName, "utf8"); if (!content.includes("import")) continue;