fix: build script

This commit is contained in:
Cory Dransfeldt 2024-10-31 04:34:45 -07:00
parent 7d95234fa3
commit 4520e0c9d4
No known key found for this signature in database
3 changed files with 4889 additions and 4886 deletions

View file

@ -14,8 +14,11 @@ try {
fileNames.forEach((filename) => {
const filePath = path.join(ICONS_DIR, filename)
const contents = readFileSync(filePath, 'utf8').trim()
const lines = contents.split('\n')
const guts = lines.slice(1, -1).join(' ').replace(/\s{2,}/g, ' ')
const guts = contents
.replace(/^<svg[^>]*>/, '')
.replace(/<\/svg>$/, '')
.replace(/\s{2,}/g, ' ')
object[filename.slice(0, -4)] = guts
})