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

Targeting Specific Font Files #29

Closed
archy-bold opened this issue Jun 4, 2020 · 4 comments · Fixed by #48
Closed

Targeting Specific Font Files #29

archy-bold opened this issue Jun 4, 2020 · 4 comments · Fixed by #48

Comments

@archy-bold
Copy link

The script works great, but has the unfortunate side effect of running on every font I use in my CSS including regular type-faces.

Is it possible to target only specific font files? ie only font-awesome and not other fonts.

@patrickhulce
Copy link
Owner

Thanks for filing @archy-bold! Not currently supported but it should be fairly simple to implement. Would you be interested in picking that up? :)

@archy-bold
Copy link
Author

I'll add it to my to do list :)

Is there a usual webpack standard for that sort of thing? Using a regex to string/regex to match files?

@patrickhulce
Copy link
Owner

Hm not a standard perse but convention would suggest a regex option for the file names to match.

Maybe allowedFilesRegex and skippedFilesRegex for inclusive and exclusive matching?

Moustachos added a commit to Moustachos/fontmin-webpack that referenced this issue Aug 20, 2021
Add two options: allowedFilesRegex & skippedFilesRegex. Both can be null or RegExp, they're mutually exclusive and allowedFilesRegex has priority over skippedFilesRegex.

Fix patrickhulce#29
Fix patrickhulce#5
@Moustachos
Copy link
Contributor

@patrickhulce when you got time to check it, I made a pull request addressing this issue and #5 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants