-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
chore(imports): Direct internal imports #610
Conversation
610a1dc
to
5900760
Compare
I'm for the index files. If you didn't want to bring in index files, you could toss a package.json file in each dir and set the |
Agree on not duplicating the component name in import paths. My first thought is an index.js file as well. |
Heads up, regarding conformance tests (near the top of the common tests):
|
5900760
to
581a6da
Compare
Current coverage is 100% (diff: 100%)@@ master #610 diff @@
====================================
Files 119 119
Lines 1915 1915
Methods 0 0
Messages 0 0
Branches 0 0
====================================
Hits 1915 1915
Misses 0 0
Partials 0 0
|
* Change imports from type index to direct * Remove index files in type folders * Add index.js to each component folder * Update internal cross-component usage to use component index
581a6da
to
9429517
Compare
Just force-pushed a small change. I was going to update the tests to use the index-based imports but decided against it. I kinda like having the test import directly from the file they're testing. Otherwise this is g2g I think 👍 |
👍 Great work, will review and merge soon as I can. |
As per discussions https://github.com/TechnologyAdvice/stardust/pull/570#discussion_r81445116 and https://github.com/TechnologyAdvice/stardust/issues/524#issuecomment-250935483:
index.js
in each "type" folderOpen questions:
Button
get its own index file? Would make it possible to doimport Button from 'stardust/elements/Button
instead of needing the double/Button/Button
. Sub-components would still be referenced at the nested path, which I think makes sensestardust/elements/Button/ButtonContent
. Thoughts?