9 lines
345 B
JavaScript
Executable File
9 lines
345 B
JavaScript
Executable File
const fs = require("fs").promises
|
|
|
|
const names = ["subscriptions", "settings", "light-on", "light-off", "search"]
|
|
const icons = names.map(name => fs.readFile(`html/static/images/${name}.svg`, "utf8"))
|
|
|
|
module.exports.icons = Promise.all(icons).then(resolvedIcons => {
|
|
return new Map(names.map((name, index) => [name, resolvedIcons[index]]))
|
|
})
|