-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: theme & content now a plugin #180
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! No comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. I found one unimplemented test that could use some logic (or maybe removal?) and a few comments that look like they could be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Fixes #178
Plugin imported via
require('@nearform/quantum/plugin')
. Tested on a separate repo usingyalc
and results seemed good, required me to pass in our package to content.Pushing our package intocontent
doesn't seem possible. Here were my findingsUPDATE
Was able to push to the config easily. It seems the
config()
actually returns the consuming applications object by reference, and so was able to modify it as such.~~1. Adding the
content
key into the plugin was unsuccessful for a variety of different paths (I assumed there may be some dynamic imports necessary, tried them all and no luck).2. Several of the big component libraries using Tailwind (Flowbite, Preline) require you to add in the package as content manually.
3. The Plugin page does not mention
content
being modifiable anywhere, howeverpresets
does. It first seemed like a better avenue to go down, as the docs quote about presets:"This can be very useful for teams that manage multiple Tailwind projects for the same brand where they want a single source of truth for colors, fonts, and other common customizations."
However, if one scrolls down to to the merging logic section , you can see that the consumers
content
would overwrite our own. I've raised a discussion about other avenues to resolve this here. ~~