From bcc612c62288d99b7841670dd3831a11ff972475 Mon Sep 17 00:00:00 2001 From: Dmitry Muhomor Date: Sat, 26 Aug 2023 19:21:50 +0300 Subject: [PATCH] sort items in generated overlay resource files This makes them easier to read. --- src/blobs/overlays.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/blobs/overlays.ts b/src/blobs/overlays.ts index b208fb7..d6cae5b 100644 --- a/src/blobs/overlays.ts +++ b/src/blobs/overlays.ts @@ -436,7 +436,11 @@ export async function serializePartOverlays(partValues: PartResValues, overlaysD }) let valuesObj = { resources: {} as { [type: string]: Array } } - for (let [{ type, key }, value] of values.entries()) { + let resEntries = Array.from(values.entries()) + resEntries.sort(([k1], [k2]) => { + return k1.key.localeCompare(k2.key) + }) + for (let [{ type, key }, value] of resEntries) { let entry = { $: { name: key,