mirror of
https://github.com/tabler/tabler.git
synced 2026-10-12 05:06:55 +04:00
Read the icon count from icons-info.json (#2943)
This commit is contained in:
1 parent
b90554b8ee
commit
25f466b408
4 files changed
+10
-11
No files matched your search
@@ -45,15 +45,8 @@ for (const iconName in iconsTags) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
writeFileSync(
|
// `count` is the number of unique icons, not of the outline and filled files.
|
||||||
join(repoRoot, 'shared/data/icons-info.json'),
|
writeFileSync(join(repoRoot, 'shared/data/icons-info.json'), JSON.stringify({ version, count: Object.keys(svgList).length }))
|
||||||
JSON.stringify({
|
|
||||||
version,
|
|
||||||
count: Object.values(svgList).reduce((acc, icon) => {
|
|
||||||
return acc + (icon.svg.outline ? 1 : 0) + (icon.svg.filled ? 1 : 0)
|
|
||||||
}, 0),
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
|
|
||||||
writeFileSync(join(repoRoot, 'shared/data/icons.json'), JSON.stringify(svgList))
|
writeFileSync(join(repoRoot, 'shared/data/icons.json'), JSON.stringify(svgList))
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
"@tabler/preview": patch
|
||||||
|
"@tabler/docs": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Updated the icon count on the icons pages to read from `icons-info.json`, so it follows the installed version.
|
||||||
@@ -1 +1 @@
|
|||||||
{"version":"3.46.0","count":6184}
|
{"version":"3.46.0","count":5130}
|
||||||
+1
-1
@@ -18,7 +18,7 @@ export const site = {
|
|||||||
// Dev Google Maps API key for local development builds.
|
// Dev Google Maps API key for local development builds.
|
||||||
googleMapsDevKey: 'AIzaSyCL-BY8-sq12m0S9H-S_yMqDmcun3A9znw',
|
googleMapsDevKey: 'AIzaSyCL-BY8-sq12m0S9H-S_yMqDmcun3A9znw',
|
||||||
// From shared/data/icons-info.json.
|
// From shared/data/icons-info.json.
|
||||||
iconsCount: 5986,
|
iconsCount: iconsInfo.count,
|
||||||
iconsVersion: iconsInfo.version,
|
iconsVersion: iconsInfo.version,
|
||||||
// From shared/data/illustrations-info.json.
|
// From shared/data/illustrations-info.json.
|
||||||
illustrationsCount: illustrationsInfo.count,
|
illustrationsCount: illustrationsInfo.count,
|
||||||
|
|||||||
Reference in new issue
Block a user