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

feat(transformer-attributify-jsx-babel): new transformer #2337

Merged
merged 5 commits into from
Apr 8, 2023

Conversation

sibbng
Copy link
Member

@sibbng sibbng commented Mar 8, 2023

Adds experimental babel transformer strategy to transformer-attributify-jsx.

Usage:

npm i @unocss/transformer-attributify-jsx-babel -D
- import transformerAttributifyJsx from '@unocss/transformer-attributify-jsx'
+ import transformerAttributifyJsx from '@unocss/transformer-attributify-jsx-babel'

@sibbng sibbng requested a review from antfu as a code owner March 8, 2023 14:02
@netlify
Copy link

netlify bot commented Mar 8, 2023

Deploy Preview for unocss ready!

Name Link
🔨 Latest commit 5b7ea45
🔍 Latest deploy log https://app.netlify.com/sites/unocss/deploys/6430cfd8cd825f00081a85c2
😎 Deploy Preview https://deploy-preview-2337--unocss.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Comment on lines 48 to 50
"@babel/core": "^7.21.0",
"@babel/plugin-syntax-jsx": "^7.18.6",
"@babel/preset-typescript": "^7.21.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should not bundle them?

And I just checked, and it seems that @unocss/transformer-attributify-jsx is included in unocss, which I don't really willing as deps on babel. If you think it's worth to have the babel transformations I guess maybe we should stop including them by default, or make another babel specific preset.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved babel transformer to a new package and not included it on unocss. I updated readmes and configurations as well. It should be ready to release if I didn't miss anything.

@antfu antfu changed the title feat(transformer-attributify-jsx): add babel transformer feat(transformer-attributify-jsx-babel): new transformer Apr 8, 2023
@antfu antfu merged commit cf1b1d4 into main Apr 8, 2023
9 checks passed
@antfu antfu deleted the feat/transformer-attributify-jsx/babel branch April 8, 2023 09:09
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

2 participants