From 5c9ccb3ab759526e84079f1c49abb87c995c7021 Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 18 Mar 2022 16:59:58 -0500 Subject: Add customization page --- scripts/updateBackgrounds.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 scripts/updateBackgrounds.js (limited to 'scripts/updateBackgrounds.js') 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' } +) -- cgit