diff --git a/build/createIconList.js b/build/createIconList.js index 6503665..671d372 100644 --- a/build/createIconList.js +++ b/build/createIconList.js @@ -1,14 +1,14 @@ var fs = require('fs') var path = require('path') +function getBase64String (type) { + return "data:image/svg+xml;base64," + fs.readFileSync(path.join(__dirname, `../dist/icons/${type}.svg`)).toString('base64') +} + var icons = { blank: getBase64String('blank'), active: getBase64String('active'), hover: getBase64String('hover') } -function getBase64String (type) { - return "data:image/svg+xml;base64," + fs.readFileSync(path.join(__dirname, `../dist/icons/${type}.svg`)).toString('base64') -} - fs.writeFileSync(path.join(__dirname, '../src/script/icons.json'), JSON.stringify(icons))