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

Example of twin inside an nx-workspace with styled components #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

anymaniax
Copy link

Based on #38 I did an example with styled-components. I added my scripts to handle multiple projects and add preset from a library

@anymaniax anymaniax changed the title feat(nx-twin-styled-components): setup Example of twin inside an nx-workspace with styled components Mar 9, 2021
@mmmoli
Copy link

mmmoli commented Mar 10, 2021

❤️ that we're coming at this from different side.

FYI: I just pushed an example with tailwind-config as a separate, buildable nx lib.

It'd be great to get your thoughts and find an identical approach.

I can shoot first: it SUCKS that my tailwind-config lib has to be a js module. I can't get it to work in ts and it makes me 😭

@anymaniax
Copy link
Author

@mmmoli I don't know if you saw I also created a function to automatically get preset from another NX library and I use it to get preset from my UI library. You can see it here. I think that way it's really customizable

@mmmoli
Copy link

mmmoli commented Mar 11, 2021

@anymaniax link's broken.

I see it here: https://github.com/ben-rogerson/twin.examples/blob/40b72ecb875b0610ddcb0a50c9a0d3d055df6b59/nx-workspace-styled-components/apps/web/tailwind.config.js

@ben-rogerson
Copy link
Owner

ben-rogerson commented Mar 11, 2021

Thanks heaps for adding the styled-components version of this @anymaniax

I'll support whichever way you guys want to head with an identical preset approach.
Personally, I'd shy away from adding custom functions in an example starter - but only if the same functionality can be provided in a simple way.

@Crisis2010
Copy link

Crisis2010 commented Apr 17, 2021

How about buildable libraries?

For now it seems like not working properly, because of ReferenceError: tw is not defined
Снимок экрана 2021-04-17 в 8 59 02 PM

@alanontheweb
Copy link

Is there a recommended example repo to start from? Was hoping to use NX workspaces with twin and stitches if possible. Thanks for any pointers.

@ben-rogerson
Copy link
Owner

ben-rogerson commented Jun 24, 2021

We haven't quite got a nx-workspace example through yet so you'll need to give one of these PR's a pilot test 🤞

@nonameolsson
Copy link

nonameolsson commented Mar 9, 2022

What is the status of this PR? Would love to see an example on how to get started with NX!

Is there anything to do to help with this?

@ben-rogerson
Copy link
Owner

@nonameolsson I feel this example has too many files and features for a twin example.
If it were simplified (remove cypress/jest/etc configs?) then it could join the others.

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.

None yet

6 participants