Skip to content

Adds ability to exclude variants and not download everything#58

Merged
eelcoj merged 11 commits intoRails-Designer:mainfrom
luizkowalski:exclude_variants
Feb 25, 2025
Merged

Adds ability to exclude variants and not download everything#58
eelcoj merged 11 commits intoRails-Designer:mainfrom
luizkowalski:exclude_variants

Conversation

@luizkowalski
Copy link
Contributor

Got some free time to work on #55 and manage to get to this point.

I tried my luck on the sync generator test but didn't work the way I wanted. Let me know what you think

@luizkowalski luizkowalski changed the title Adds ability to remove variants Adds ability to exclude variants and not download everything Feb 22, 2025
@eelcoj eelcoj merged commit bff2b81 into Rails-Designer:main Feb 25, 2025
1 check passed
@eelcoj
Copy link
Collaborator

eelcoj commented Feb 25, 2025

Thanks @luizkowalski, great work! ❤️

Also thanks for those typo-fixes (😅).

Anything you can share on the sync generator test? Missing a test for that class has been bothering me for too long.

A next iteration could be to exclude variants on install (rails g rails_icons:install)—made a quick attempt, but haven't found an elegant way with the --libraries flag supporting multiple libraries (eg. --libraries=feather heroicons).

@luizkowalski
Copy link
Contributor Author

Anything you can share on the sync generator test?

I didn't even manage to run properly, for some reason, config.libraries was always empty no matter what. I tried different things and weird setup blocks but nothing helped

A next iteration could be to exclude variants on install

I thought it used the same variant processing engine...

@luizkowalski luizkowalski deleted the exclude_variants branch February 25, 2025 09:08
@eelcoj
Copy link
Collaborator

eelcoj commented Feb 26, 2025

I thought it used the same variant processing engine...

It is, but am looking to add it to the install command, eg. rails g rails_icons:install --libraries=heroicons excluded=micro mini. This would then inject micro and mini to excluded_variants array in the initializer.

@luizkowalski
Copy link
Contributor Author

ahh I see what you mean now

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

Successfully merging this pull request may close these issues.

2 participants