Skip to content

Commit

Permalink
Make total count of icons better understandable
Browse files Browse the repository at this point in the history
  • Loading branch information
tujoworker committed Apr 13, 2023
1 parent 3e274bc commit 0b86309
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/dnb-eufemia/scripts/prebuild/tasks/convertSvgToJsx.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,12 @@ export default async function convertSvgToJsx({
customIconsLockFilePath,
})

const sizes = Object.keys(ICON_SIZES)

log.succeed(
`> PrePublish: Converting "svg to jsx" for "${assetsDir}" is done (${icons.length} icons)`
`> PrePublish: Converting "svg to jsx" for "${assetsDir}" is done (converted ${
icons.length
} icons with ${icons.length / sizes.length} in total)`
)

await controllRoutine({ icons })
Expand All @@ -85,10 +89,9 @@ export default async function convertSvgToJsx({

const controllRoutine = async ({ icons }) => {
const listOfIcons = Object.values(icons)

const sizes = Object.values(ICON_SIZES).filter(({ suffix }) => {
return Boolean(suffix)
})
const sizes = Object.values(ICON_SIZES).filter(({ suffix }) =>
Boolean(suffix)
)

sizes.forEach(({ suffix: size }) => {
listOfIcons.forEach(({ name: origName }) => {
Expand Down

0 comments on commit 0b86309

Please sign in to comment.