-
Notifications
You must be signed in to change notification settings - Fork 135
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
prototype - css-in-js (glam) #1
Comments
oh, please assign this to me when you can :) |
up for grabs, if anyone else wants to take a crack at it -
|
Would this macro prototype also work for e.g. styled components? If not, I'll be glad to contribute with a tailored one! |
I'm just working on a small prototype to prove that it works, if you want something more full featured/matching the SC api, you're likely better off integrating with emotion https://github.com/tkh44/emotion since they already have much of the compliation work done |
Thank you for pointing me to emotion, but I wanted to try to prototype a SC macro to work with Create React App 😉. |
styled-components already works in CRA (by nature of being a pure runtime lib), not sure what you'd use the macro for? |
oh is it for this? https://github.com/styled-components/babel-plugin-styled-components go for it, could be useful |
yep! |
This adds alpha support for [babel-macros](https://github.com/kentcdodds/babel-macros) ref: kentcdodds/babel-plugin-macros#1 Usage: ```javascript import preval from 'babel-plugin-preval/macros' const x = preval`module.exports = Math.random()` ```
Done! You can now use import preval from 'babel-plugin-preval/macros'
const x = preval`
module.exports = Math.random()
` And poof, it works. Can also do a function call or JSX :) Fun stuff. |
Gonna close this in favor of emotion-js/emotion#132 |
This adds alpha support for [babel-macros](https://github.com/kentcdodds/babel-macros) ref: kentcdodds/babel-plugin-macros#1 Usage: ```javascript import preval from 'babel-plugin-preval/macros' const x = preval`module.exports = Math.random()` ```
making this issue and assigning to myself, to make a prototype of glam that's compatible with this package, just to prove that it's possible.
the idea is to get this - facebook/create-react-app#2730 (comment) to "work".
The text was updated successfully, but these errors were encountered: