Skip to content
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

Generates TypeScipt while project is JS #574

Open
SilBenjamin opened this issue May 23, 2024 · 5 comments
Open

Generates TypeScipt while project is JS #574

SilBenjamin opened this issue May 23, 2024 · 5 comments

Comments

@SilBenjamin
Copy link

Everywhere in my application I am using (.js) files. I am concerned having the storybook files in my project in (.ts) and (.tsx). Is it a problem if these files are in typescript while my project is .js? Why does storybook recognize my project as typescript? How can I make sure that when I add storybook to my project, that it generates the right (.js) files?

@dannyhw
Copy link
Member

dannyhw commented May 23, 2024

@SilBenjamin You can pass a flag to the code generation to use js there is no requirement to use typescript. Typescript is just the default because thats the direction storybook is going in.

@SilBenjamin
Copy link
Author

Thank you for your answer @dannyhw !How do I do this?

@dannyhw
Copy link
Member

dannyhw commented May 23, 2024

The tutorial template uses it you can see the -js flag on the script

https://github.com/chromaui/intro-storybook-react-native-template/blob/fefead20a0f05933fc0b476bc20dd87b929d37cb/package.json#L31

and here in metro
https://github.com/chromaui/intro-storybook-react-native-template/blob/fefead20a0f05933fc0b476bc20dd87b929d37cb/metro.config.js#L5

@SilBenjamin
Copy link
Author

@dannyhw thanks again so much for your help!

@PedroAugustoRamalhoDuarte

Thanks @dannyhw!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants