diff options
author | mat <github@matdoes.dev> | 2022-03-18 16:59:58 -0500 |
---|---|---|
committer | mat <github@matdoes.dev> | 2022-03-18 16:59:58 -0500 |
commit | 5c9ccb3ab759526e84079f1c49abb87c995c7021 (patch) | |
tree | dd5e0a3b88c8ea1add26de926a9bbd1aa7402130 /scripts/updateBackgrounds.js | |
parent | 557423e887a363d0d1be1dfc6db613f83fd7cec0 (diff) | |
download | skyblock-stats-5c9ccb3ab759526e84079f1c49abb87c995c7021.tar.gz skyblock-stats-5c9ccb3ab759526e84079f1c49abb87c995c7021.tar.bz2 skyblock-stats-5c9ccb3ab759526e84079f1c49abb87c995c7021.zip |
Add customization page
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' } +) |