-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Capture the CssSyntaxError object and throw error. #6
base: master
Are you sure you want to change the base?
Conversation
@aga5tya thank you! Can you add a test? |
@giuseppeg,, do i have to include a failure test case ? like a scenario expecting an error on the wrong styles. I'm new to unit testing stuff,, apologies in case its a trivial question. |
@aga5tya hey no worries!
correct I would add a new fixture to tests/fixtures with some css error e.g. a missing semicolon: export default () => (
<div>
<style jsx>{`
p {
color: red
width: 100%
}
`}</style>
</div>
) And then the test in |
@giuseppeg , please review and guide. Updated the PR. |
+1 Great |
@aga5tya sorry I've been busy. The PR looks good, thank you! While we are on it I was thinking that maybe we can print out some info about the error source too, what do you think? I saw that the postcss error object has a Also since the PostCSS processor is not loading the css from a file we get something like:
Would you be interested in fixing this too? |
} | ||
`}</style> | ||
</div> | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs an empty line at the end of the file
@aga5tya want me to finish this branch? |
can't wait for this |
@giuseppeg, please do if you have time, i have been busy with lot of other things, won't have time until a month. |
# Conflicts: # test/index.js
we have styled-jsx-postcss working on scaleapi.com 💯 |
Just curious, when will this get pulled into the current release? |
I want to see if we can ship plugins support to styled-jsx (there is an open PR for it) and in case convert this repo to a plugin for styled-jsx instead of doing parallel development. |
Fixes #5