mirror of
https://github.com/tabler/tabler-icons.git
synced 2025-09-01 01:52:00 +02:00
build fix
This commit is contained in:
@@ -20,7 +20,7 @@ files.forEach(function (file) {
|
|||||||
const unicode = maxUnicode.toString(16)
|
const unicode = maxUnicode.toString(16)
|
||||||
|
|
||||||
if (unicode) {
|
if (unicode) {
|
||||||
svgFile = svgFile.replace(/-->\n<svg/i, function (m) {
|
svgFile = svgFile.replace(/-->\s?\n<svg/i, function (m) {
|
||||||
return `unicode: "${unicode}"\n${m}`
|
return `unicode: "${unicode}"\n${m}`
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -34,10 +34,14 @@ files.forEach(function (file) {
|
|||||||
if (!svgFile.match(/\nversion: "?([a-f0-9.]+)"?/i)) {
|
if (!svgFile.match(/\nversion: "?([a-f0-9.]+)"?/i)) {
|
||||||
const minorVersion = newVersion.split('.').slice(0, 2).join('.')
|
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}`
|
return `version: "${minorVersion}"\n${m}`
|
||||||
})
|
})
|
||||||
|
|
||||||
|
console.log(svgFile);
|
||||||
|
|
||||||
console.log(`Add version "${minorVersion}" to "${file}"`)
|
console.log(`Add version "${minorVersion}" to "${file}"`)
|
||||||
fs.writeFileSync(file, svgFile, 'utf8')
|
fs.writeFileSync(file, svgFile, 'utf8')
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user