Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The use of 'font_class' as the name for the icon is more reasonable #2

Open
wuyax opened this issue Aug 19, 2023 · 0 comments
Open

Comments

@wuyax
Copy link

wuyax commented Aug 19, 2023

The use of font_class as the name for the icon is more reasonable because once the icon is uploaded to Iconfont, the name cannot be edited, but 'Font Class / Symbol' can be edited, and it corresponds to the font_class field.

Make the following changes to line 75 of the code:

const iconifyJson = makeIconifyJson(
      project.name,
      icons.reduce((obj, item) => {
        const svg = new SVG(item.show_svg);
        return Object.assign(obj, {
          [toKebabCase(item.font_class)]: { // Replace the 'name' property with the 'font_class' property.
            body: svg.getBody(),
            ...svg.viewBox,
          },
        });
      }, {})
    );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant