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

Prefix icon name #110

Closed
kbrilla opened this issue Mar 11, 2021 · 4 comments
Closed

Prefix icon name #110

kbrilla opened this issue Mar 11, 2021 · 4 comments

Comments

@kbrilla
Copy link

kbrilla commented Mar 11, 2021

Hi, I would be willing to create a PR with a feature to prefix not file but icon name.

with for example

...
 "namePrefix": 'my',
...

we wold get

export const myIconExpressionLess: MyIcon = {
  name: 'my_expression_less',
  data: `<svg xmlns="http://...`
};
export const myIconFull: MyIcon = {
  name: 'my_full',
  data: `<svg xmlns="http://www...`
};
export const myIconLaughing: MyIcon = {
  name: 'my_laughing',
  data: `<svg xmlns="http://www.w...`
};
export const myIconSmilingFace: MyIcon = {
  name: 'my_smiling_face',
  data: `<svg xmlns="http://www.w3...`
};
/* ⚠️ Do not edit this file - this file is generated by svg-to-ts*/

export type myIcons = 'my_expression_less' | 'my_full' | 'my_laughing' | 'my_smiling_face';
export interface MyIcon {
  name: myIcons;
  data: string;
}

this will allow creating icon bundles that can be distinguished by icon name.

For example, would be great for @ngeat/svg-icon library to use multiple bundles of icons exp. font-awesome 4 and 5 toogether etc.. fa4_squere ,'fa5_squereandmy_squere`;

@kreuzerk
Copy link
Owner

Hi @criskrzysiu

Thanks for this issue. I think this is a valid use case and makes sense 👍 I would expect the namePrefix to be an optional property. With this approach, we don't break anybody.

Looking forward to the PR ;)

@BlindDespair
Copy link

I also think that we should be able to specify a prefix for the const and for the file name separately when using files. Because now I end up with files that look like myPrefixWord-down.icon.ts where as I expect it to be my-prefix-word-down.icon.ts.

@Lonli-Lokli
Copy link

@kreuzerk I believe this issue can be closed now

@kreuzerk
Copy link
Owner

Yes. @Lonli-Lokli thx for the reminder 👍

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

4 participants