From 25c5826566953623f1e13df9330772dc72e1dab5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Marius=20L=C3=B8set?= Date: Wed, 22 Nov 2023 09:06:01 +0100 Subject: [PATCH] fix: correct sorting --- apps/www/src/lib/registry/registry.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/apps/www/src/lib/registry/registry.ts b/apps/www/src/lib/registry/registry.ts index 56ee8b80..262f668f 100644 --- a/apps/www/src/lib/registry/registry.ts +++ b/apps/www/src/lib/registry/registry.ts @@ -36,9 +36,6 @@ async function crawlUI(rootPath: string) { withFileTypes: true, }) - // Sort to ensure consistent order across platforms - dir.sort() - const uiRegistry: Registry = [] for (const dirent of dir) { @@ -62,9 +59,6 @@ async function crawlExample(rootPath: string) { withFileTypes: true, }) - // Sort to ensure consistent order across platforms - dir.sort() - const exampleRegistry: Registry = [] for (const dirent of dir) { @@ -105,8 +99,6 @@ async function buildUIRegistry(componentPath: string, componentName: string) { const dir = await readdir(componentPath, { withFileTypes: true, }) - // Sort to ensure consistent order across platforms - dir.sort() const files: string[] = [] const dependencies = new Set() @@ -119,6 +111,7 @@ async function buildUIRegistry(componentPath: string, componentName: string) { const file_path = join('ui', componentName, dirent.name) files.push(file_path) + files.sort() // only grab deps from the vue files if (dirent.name === 'index.ts')