Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/util/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -85,7 +89,11 @@ export async function getPartialsUsage(): Promise<Record<string, Usage>> {
);

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;
Expand Down