Make a report of classes that are found, included and excluded #4520
slevy85
started this conversation in
Ideas / feature requests
Replies: 1 comment
-
|
This would be very useful, especially for design-system packages where the source boundary is bigger than the app actually uses. I would frame the report around decisions daisyUI already made during generation, for example: daisyUI include/exclude report
included:
btn found in packages/ds/button.tsx
modal found in packages/ds/modal.tsx
found but excluded:
drawer found in packages/ds/drawer.tsx, not in include list
dropdown excluded by config
configured but unused:
carousel listed in include, not found in scanned sourcesThat would help in three different cases:
I would keep it as an opt-in diagnostic command/flag rather than normal build output, because large apps could generate noisy reports. But as a CI check for internal design systems, it would be excellent: fail the build when a daisyUI class is found in source but excluded from the generated CSS. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
My need is that I want to include only the daisyui styles that I use. For this I use the directive "include" which is great, but it is very hard to be sure that I didn't miss something.
If Daisyui could tell me "Tailwind found this utility class in your code but we didn't include it because it is not in the include directive" (or because it is in the exclude directive), that would be great.
My particular use case is that I have an internal design system based on daisyui, it contains all daisyui classes, and in my apps I need to either
@source ../packages/my-design-system/**/*.tsxFirst solution gives too much unused css, the second solution is okay but cumbersome and error-prone.
Using "include" is a good alternative, especially if it provides a report of included/excluded.
Thank you for this great library.
Beta Was this translation helpful? Give feedback.
All reactions