1
0
mirror of https://github.com/tabler/tabler-icons.git synced 2025-08-30 09:10:59 +02:00

build fix

This commit is contained in:
codecalm
2024-10-23 07:16:48 +02:00
parent c8a6c7b15c
commit d99d2acc31

View File

@@ -20,7 +20,7 @@ files.forEach(function (file) {
const unicode = maxUnicode.toString(16)
if (unicode) {
svgFile = svgFile.replace(/-->\n<svg/i, function (m) {
svgFile = svgFile.replace(/-->\s?\n<svg/i, function (m) {
return `unicode: "${unicode}"\n${m}`
})
@@ -34,10 +34,14 @@ files.forEach(function (file) {
if (!svgFile.match(/\nversion: "?([a-f0-9.]+)"?/i)) {
const minorVersion = newVersion.split('.').slice(0, 2).join('.')
svgFile = svgFile.replace(/-->\n<svg/i, function (m) {
console.log(svgFile);
svgFile = svgFile.replace(/-->\s?\n<svg/i, function (m) {
return `version: "${minorVersion}"\n${m}`
})
console.log(svgFile);
console.log(`Add version "${minorVersion}" to "${file}"`)
fs.writeFileSync(file, svgFile, 'utf8')
}