fix: sort readdir
This commit is contained in:
parent
31ada39904
commit
3c9361a32b
|
|
@ -36,6 +36,9 @@ async function crawlUI(rootPath: string) {
|
||||||
withFileTypes: true,
|
withFileTypes: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Sort to ensure consistent order across platforms
|
||||||
|
dir.sort()
|
||||||
|
|
||||||
const uiRegistry: Registry = []
|
const uiRegistry: Registry = []
|
||||||
|
|
||||||
for (const dirent of dir) {
|
for (const dirent of dir) {
|
||||||
|
|
@ -59,6 +62,9 @@ async function crawlExample(rootPath: string) {
|
||||||
withFileTypes: true,
|
withFileTypes: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Sort to ensure consistent order across platforms
|
||||||
|
dir.sort()
|
||||||
|
|
||||||
const exampleRegistry: Registry = []
|
const exampleRegistry: Registry = []
|
||||||
|
|
||||||
for (const dirent of dir) {
|
for (const dirent of dir) {
|
||||||
|
|
@ -99,6 +105,8 @@ async function buildUIRegistry(componentPath: string, componentName: string) {
|
||||||
const dir = await readdir(componentPath, {
|
const dir = await readdir(componentPath, {
|
||||||
withFileTypes: true,
|
withFileTypes: true,
|
||||||
})
|
})
|
||||||
|
// Sort to ensure consistent order across platforms
|
||||||
|
dir.sort()
|
||||||
|
|
||||||
const files: string[] = []
|
const files: string[] = []
|
||||||
const dependencies = new Set<string>()
|
const dependencies = new Set<string>()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user