-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Support Tailwind out of the box #1155
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.
nice job getting this working
@@ -125,6 +125,22 @@ def _compile_components(components: Set[CustomComponent]) -> str: | |||
) | |||
|
|||
|
|||
def _compile_tailwind( | |||
config: dict, |
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.
I think the type annotation needs to be Dict
to support 3.7, we can fix in a follow up
@@ -239,6 +255,26 @@ def compile_components(components: Set[CustomComponent]): | |||
return output_path, code | |||
|
|||
|
|||
@write_output | |||
def compile_tailwind( | |||
config: dict, |
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.
here also
Closes #141. This change adds Tailwind support to Pynecone out of the box by installing Tailwind in the default template and adding a
tailwind
key in the config. An empty dict simply enables Tailwind; the dict can be filled in to configure any Tailwind options except forcontent
, which we set ourselves to avoid a leak in the abstraction (since we have to set it to a Next.js-specific path). Strings passed forplugins
are automatically wrapped withrequire(...)
.An example app has been added at reflex-dev/reflex-examples#112.
All Submissions:
Type of change
New Feature Submission: