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 is destructive #549

Closed
leebenson opened this issue Oct 17, 2016 · 4 comments
Closed

getstorybook is destructive #549

leebenson opened this issue Oct 17, 2016 · 4 comments

Comments

@leebenson
Copy link

leebenson commented Oct 17, 2016

Running getstorybook inside an existing Storybook'd folder will destructively overwrite .stories.

I learned that the hard way when a custom webpack config I spent 3 hours working on wound up getting killed 👍

If this is intentional, it might be worth adding an 'Are you sure?' prompt.

@arunoda
Copy link
Member

arunoda commented Oct 17, 2016

By default, getstorybook won't allow you to run inside already initiated project.
You only can do it by adding the -f flag.
Even if you do so, git diff is your friend.

Is this happening without the -f flag?

@leebenson
Copy link
Author

leebenson commented Oct 18, 2016

I didn't commit the prior version, so git diff unfortunately didn't save the day...

Yes, it happened without the -f flag.

This might be because I moved the stories folder to src/stories (to fit better with my code layout), but I left .storybook intact.

@arunoda
Copy link
Member

arunoda commented Oct 18, 2016

It detect that using package.json and looking for @kadira/storybook.
It's pretty hard to happen this without -f

@leebenson
Copy link
Author

I'll close this since I don't recall the exact steps that led to this error. If it comes up again, I'll try to be more explicit in reproducing it.

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

2 participants