-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Adds emotion support #262
Adds emotion support #262
Conversation
999aa66
to
2650088
Compare
Very cool! Happy to test if you want to publish it to beta. |
@bitttttten Absolutely! Thank you. At the moment I'm in the middle of gardening the internals so they won't get too duplicated while still allowing customizations on the rendering (styling) ends. Thinking of making Storybook accept an Atomic Layout build module via environmental variables so it can include even versions built with different styling solutions within a single monorepo. Overall, no estimates how fast I can land this, but at least the roadmap is clear. |
Performed a stub of |
b558ab3
to
ca8d973
Compare
Parametric Storybook buildsThis pull request reworks Storybook configuration to accept parametric builds. By providing environmental variables that point to the package (as in "monorepo package") and build target (cjs/umd/esm) Storybook is able to resolve the build module and alias Issue: Storybook includes
|
231bddb
to
dd1fa6d
Compare
Parametric Cypress runsMuch similar to the parametric Storybook builds, Cypress will now accept the Cypress configuration has been moved to the rool level as well. Issue: Cypress path resolvingIf run in a nested package's directory, Cypress will resolve the paths in the execution command relative to that directory (which is expected). Since Cypress configuration lives in the root, one needs to explicitly point to it: $ cypress run -C ../../cypress.json The Cypress configuration may set paths to various assets like
However, those path in $ (cd ../../ && cypress run ...)
|
Currently trying to build |
CJS buildGot the CJS build working by properly configuring {
"compilerOptions": {
"rootDirs": ["src", "../atomic-layout/src"]
}
}
|
Storybook 5.3 issueSolved by: creating Updating from
On the local such exception is represented in a different way:
|
ed81b2c
to
d1842ff
Compare
Need to verify if those |
Currently the size of UMD bundle of
I have a suspicion that happens due to
|
Emotion support alpha is published! 🎉The alpha version of the Atomic Layout package supporting Installyarn add @atomic-layout/[email protected] @emotion/core @emotion/styled Documentation
There are some shortcuts to get you started: ExamplesShare feedbackIf you found any issues please submit them so I could take a look. Thank you. cc @bitttttten |
- @atomic-layout/[email protected] - @atomic-layout/[email protected] - [email protected]
…"@emotion/styled"
- @atomic-layout/[email protected] - [email protected]
- @atomic-layout/[email protected] - [email protected]
Changes
Architecture & Configuration
@atomic-layout/emotion
packageBuild
@emotion/core
and@emotion/styled
as globals in Rollup configImplementation
Only
component, because it imports relativeBox
from theatomic-layout
Visible
componentatomic-layout
entirely, because of the Babel plugin transforming the imports fromstyled-components
to@emotion/styled
. There is little motivation to keep some separate implementations (copies) of components by default.Testing
Box
does not allowdisplay
property override fromapplyStyles
):DX
@atomic-layout/emotion
readme@atomic-layout/emotion
implementationNice to have
include
workaround forbabel-loader
(Error: exports is not defined storybookjs/storybook#3346)GitHub
Release version
Contributor's checklist
master
yarn verify
and verified the build and tests passing