-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
Generate .tsx stories in typescript projects #5050
Comments
I went through the quick start guides of all relevant frameworks/setups:
The most straightforward way to detect a TS project is to check |
I looked into this: currently, we're using
|
@Keraito We could also switch to using |
Yeah that sounds good @shilman, since the PR I created at |
Took a bit longer, but I started working on this again :)
…On Sun, 3 Mar 2019 at 15:42, Michael Shilman ***@***.***> wrote:
@Keraito <https://github.com/Keraito> We could also switch to using
recursive-copy which already supports this feature:
https://www.npmjs.com/package/recursive-copy
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5050 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFrfcaUOFrFthjUID42Vn6t5hlT9VBpiks5vS99agaJpZM4ZadBp>
.
|
Yowza!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.0-alpha.44 containing PR #10547 that references this issue. Upgrade today to try it out! You can find this prerelease on the Closing this issue. Please re-open if you think there's still more to do. |
Splitting out "generate tsx stories" as a feature request out of #5028
What
sb init
has a--story-format
option, which can becsf
|csf-ts
|mdx
.csf-ts
templates exist for a few of the different project types. We should havecsf-ts
templates for all of the different project types.The default format is
csf
. But if the user doesn't specify a format, andsb init
detects that it's a typescript project, it should use thecsf-ts
format. It looks like a dependency or devDependency ontypescript
and the presence of atsconfig.json
is a reasonable heuristic.It should fallback to
csf
format ifcsf-ts
is unavailable for the given project type, since we can't guarantee that new project types will always have acsf-ts
template.The text was updated successfully, but these errors were encountered: