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

getstorybook -f overwrites existing stories #365

Closed
michaelryancaputo opened this issue Aug 8, 2016 · 5 comments
Closed

getstorybook -f overwrites existing stories #365

michaelryancaputo opened this issue Aug 8, 2016 · 5 comments

Comments

@michaelryancaputo
Copy link

Use case:
Creating react components that will be used in a private npm registry. To init the storybook app to view/make changes, it needs to be reinitialized. The only way to do this seems to be to run getstorybook -f which seems to overwrite any changes to the /stories folder.

A user should be able to pull a repo containing a storybook component and initialize a storybook app that does not overwrite work.

@arunoda
Copy link
Member

arunoda commented Aug 9, 2016

Could you give me more info on this.
For that, I don't think you need to getstorybook -f.

Just invoking npm install is sufficient I guess.
Tell me more, I'll try to think more.

@michaelryancaputo
Copy link
Author

Thanks,
running npm i does install the packages, but it doesn't include the storybook configurations. When I pull my repo, after running an npm install, I get the following error: Error: => Create a storybook config file in "./.storybook/config.js". - I guess this file isn't included in the repository i'm committing, which can be remedied, but I'm guessing others may have this problem as well and it could be improved.
Thank you for responding so quickly.

@arunoda
Copy link
Member

arunoda commented Aug 9, 2016

@michaelryancaputo The thing is you need to commit the files created by getstorybook after you've done any changes.

I hope that's the issue here. Or could you give me a sample repo or some other way we could re-produce this locally. Then I can dive more.

@michaelryancaputo
Copy link
Author

Ok, it seems like there is a .gitignore somewhere stopping me from being able to add the config file without forcing it. I don't see it anywhere in my path.

I guess that is the only way to do this. Thank you for your prompt reply.

Please close this if you are satisfied with this answer.

Thanks again.

@arunoda
Copy link
Member

arunoda commented Aug 9, 2016

great.

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

No branches or pull requests

2 participants