-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
[WIP] Babel plugin for preprocessing #757
Conversation
packages/babel-plugin/src/index.js
Outdated
const defaultIdentifiers = ['createStyleSheet', 'injectSheet'] | ||
|
||
export default declare(({types: t, ...api}, {identifiers = defaultIdentifiers, jssOptions}) => { | ||
api.assertVersion(7) |
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.
Should we maybe update our own babel packages to v7 as well? Would make testing easier.
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.
sure, if you get time, v6 and 7 are largely compatible
styles returned from a function returned from a function call with refs
@cssinjs/core anyone wants to review this one? I am in the testing phase yet, but I want already start with making this code high quality readable |
Can you rename the directory from |
@@ -0,0 +1,14 @@ | |||
import * as babel7 from '@babel/core' |
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.
Maybe rename to just babel?
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.
I am working on tests to ensure babel6 works, so it will be needed
Also, can we have one standard for where the test files should be located? Because right now sometimes |
yep |
There are 2 different testing scenarios. One is unit tests, where I actually test a specific module. The other one is more like an integration tests. In this case I 100% did integration tests and I had them all in index.test.js but then the amount of tests grew and file became unreadable, so I split them up in separate suits. I think its ok to not have this consistency. If you are testing a specific module, then it should be module.test.js, otherwise if a test uses multiple modules it should go into |
Remaining todo:
|
"@babel/helper-plugin-utils": "^7.0.0-beta.53", | ||
"babel-generator": "^6.26.1", | ||
"babel-types": "^6.26.0", | ||
"jss": "^9.8.7", |
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.
Shouldn't jss be a peer dependency?
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.
seems valid
guys, any progress on this? Like css extraction I mean... |
Issue #579