src
└── index.tsx # <Thing /> component defined here.
stories
└── Thing.stories.tsx
test
└── blah.test.tsx # 'Thing' tests defined here.
Desired Behavior
As a library grows to a larger size, the flat-directory nature of the package can benefit from the (subjectively nice) colocation of components with their tests and stories:
Current Behavior
TSDX bootstraps a folder structure as:
Desired Behavior
As a library grows to a larger size, the flat-directory nature of the package can benefit from the (subjectively nice) colocation of components with their tests and stories:
Suggested Solution
Builtin support for this structure out of the box, such the same as adding support for Storybook or not.
Who does this impact? Who is this for?
Component library owners who bootstrap with TSDX.
Describe alternatives you've considered
¯\_(ツ)_/¯
Additional context / Request
The above manual restructure works, and all is dandy with an accompanying
.storybook/main.js
diff:However, the stories now also end up in
dist/
:If there is guidance on how to avoid bundling the
*.stories.d.ts
files in the output, that would be grand.ref: An example/reference repo I walked through to validate the above: https://github.com/spxrogers/tsdx-component-lib