diff options
Diffstat (limited to 'scripts/updateBackgrounds.js')
-rw-r--r-- | scripts/updateBackgrounds.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/updateBackgrounds.js b/scripts/updateBackgrounds.js index 425e2fe..0c3e214 100644 --- a/scripts/updateBackgrounds.js +++ b/scripts/updateBackgrounds.js @@ -6,6 +6,8 @@ const imagePool = new ImagePool(cpus().length) // read the file names in the backgrounds folder const backgrounds = await fs.readdir('static/backgrounds') +// sort by natural order +backgrounds.sort((a, b) => a.localeCompare(b, 'en', { numeric: true, ignorePunctuation: true })) await fs.writeFile( 'src/_backgrounds.json', |