diff options
Diffstat (limited to 'scripts/updateBackgrounds.js')
-rw-r--r-- | scripts/updateBackgrounds.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/updateBackgrounds.js b/scripts/updateBackgrounds.js new file mode 100644 index 0000000..e2c74f2 --- /dev/null +++ b/scripts/updateBackgrounds.js @@ -0,0 +1,10 @@ +import fs from 'fs' + +// read the file names in the backgrounds folder +const backgrounds = fs.readdirSync('static/backgrounds') + +await fs.promises.writeFile( + 'src/_backgrounds.json', + JSON.stringify(backgrounds), + { encoding: 'utf8' } +) |