import fs from 'fs' import { createScreenshot } from './helpers.mjs' const icon = 'ghost', strokes = ['.25', '.5', '.75', '1', '1.25', '1.5', '1.75', '2', '2.25', '2.5', '2.25'], svgFileContent = fs.readFileSync(`icons/${icon}.svg`).toString(), padding = 16, paddingOuter = 3, iconSize = 56, width = 830, height = iconSize + paddingOuter * 2 let svgContentSymbols = '', svgContentIcons = '', x = paddingOuter strokes.forEach(function(stroke) { let svgFileContentStroked = svgFileContent.replace('', '') .replace(/\n\s+/g, '') svgContentSymbols += `\t${svgFileContentStroked}\n` svgContentIcons += `\t\n` x += padding + iconSize }) const svgContent = `\n${svgContentSymbols}\n${svgContentIcons}\n` const svgContentDark = `\n${svgContentSymbols}\n${svgContentIcons}\n` fs.writeFileSync('.github/icons-stroke.svg', svgContent) fs.writeFileSync('.github/icons-stroke-dark.svg', svgContentDark) await createScreenshot('.github/icons-stroke.svg') await createScreenshot('.github/icons-stroke-dark.svg')