{"id":13499957,"url":"https://github.com/JiangWeixian/babel-plugin-styled-windicss","last_synced_at":"2025-03-29T05:32:41.561Z","repository":{"id":47151599,"uuid":"393920875","full_name":"JiangWeixian/babel-plugin-styled-windicss","owner":"JiangWeixian","description":"windicss + styled-components (beta)","archived":false,"fork":false,"pushed_at":"2022-11-20T09:57:34.000Z","size":1139,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"windicss","last_synced_at":"2025-03-26T19:11:21.684Z","etag":null,"topics":["babel","plugin","styled-components","windicss"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JiangWeixian.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"JiangWeixian","patreon":"jiangweixian","open_collective":"qidanta","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2021-08-08T09:49:15.000Z","updated_at":"2025-01-28T02:26:00.000Z","dependencies_parsed_at":"2023-01-23T09:16:02.763Z","dependency_job_id":null,"html_url":"https://github.com/JiangWeixian/babel-plugin-styled-windicss","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JiangWeixian%2Fbabel-plugin-styled-windicss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JiangWeixian%2Fbabel-plugin-styled-windicss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JiangWeixian%2Fbabel-plugin-styled-windicss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JiangWeixian%2Fbabel-plugin-styled-windicss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JiangWeixian","download_url":"https://codeload.github.com/JiangWeixian/babel-plugin-styled-windicss/tar.gz/refs/heads/windicss","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246145012,"owners_count":20730494,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["babel","plugin","styled-components","windicss"],"created_at":"2024-07-31T22:00:48.474Z","updated_at":"2025-03-29T05:32:41.072Z","avatar_url":"https://github.com/JiangWeixian.png","language":"JavaScript","funding_links":["https://github.com/sponsors/JiangWeixian","https://patreon.com/jiangweixian","https://opencollective.com/qidanta"],"categories":["Plugins"],"sub_categories":["Framework-agnostic Plugins"],"readme":"# `babel-plugin-styled-windicss`\n\u003e windicss + styled-components = 🥰\n\na fork version of [babel-plugin-styled-components](https://github.com/styled-components/babel-plugin-styled-components), but just compile windicss into css\n\n## feature\n\n1. support compile tailwindcss `@apply`\n2. support compile windicss `group`\n\n## install\n\nInstall the plugin first:\n\n```\nnpm install --save-dev babel-plugin-styled-windicss\n```\n\nThen add it to your babel configuration:\n\n```JSON\n{\n  \"plugins\": [\"babel-plugin-styled-windicss\"]\n}\n```\n\nvite:\n\n```javascript\nimport { defineConfig } from \"vite\";\nimport react from \"@vitejs/plugin-react\";\nexport default defineConfig({\n  plugins: [\n    react({\n      babel:{\n        plugins:[\"babel-plugin-styled-windicss\"]\n      }\n    }),\n  ],\n});\n\n```\n\n## usage\n\n\u003e **💡 NOTE**  \nsee more example [here](./example/src/pages/index.tsx)\n\n**compile tailwindcss `@apply`**\n\n```tsx\n// input\nconst Wrapped = styled(Inner)`\n  color: red;\n  @apply m-0 p-0 w-100vw h-100vh overflow-hidden;\n`\n// output\nconst Wrapped = styled(Inner)`\n  color: red;\n  margin: 0px;\n  overflow: hidden;\n  padding: 0px;\n  width: 100vw;\n`\n```\n\n**compile windicss `group`**\n\n```tsx\n// input\nconst Wrapped = styled(Inner)`\n  @apply m-0 p-0 w-100vw h-100vh overflow-hidden hover:(bg-blue-500 text-xs);\n`\n\nconst Wrapped = styled(Inner)`\n  color: red;\n  \u0026:hover {\n    -tw-bg-opacity: 1;\n    background-color: rgba(59, 130, 246, var(--tw-bg-opacity));\n    font-size: 0.75rem;\n    line-height: 1rem;\n  }\n  \u0026 {\n    height: 100vh;\n    margin: 0px;\n    overflow: hidden;\n    padding: 0px;\n    width: 100vw;\n  }\n`\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJiangWeixian%2Fbabel-plugin-styled-windicss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJiangWeixian%2Fbabel-plugin-styled-windicss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJiangWeixian%2Fbabel-plugin-styled-windicss/lists"}