typewind icon indicating copy to clipboard operation
typewind copied to clipboard

Codemod: Tailwind -> Typewind

Open NicolasLopes7 opened this issue 2 years ago • 2 comments

Create a codemod that converts tailwind classes to typewind.

I still need to figure out the patterns we want to observe and how to make sure it's a class from tailwind. Would love to hear your thoughts here @Mokshit06 @kavinvalli

NicolasLopes7 avatar Jan 31 '23 02:01 NicolasLopes7

Hi! I'm not sure what class patterns to observe in this case, like we can make the codemod work decently well for class/className attributes but it is hard to be sure how reliably we can convert other places. Like if I have a text "This is a container", should it be replaced with "This is a ${tw.container}", or be converted to a template literal.

Do you have any ideas on how we should approach this?

Mokshit06 avatar Feb 02 '23 06:02 Mokshit06

Hi, i wrote some similar plugin - prettier-plugin-typewind, and it do this

add link to this https://github.com/epicbytes/prettier-plugin-typewind

epicbytes avatar Apr 17 '23 02:04 epicbytes