Skip to content
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.

Placing stories outside storybook's config folder #127

Closed
barakcoh opened this issue Mar 5, 2017 · 4 comments
Closed

Placing stories outside storybook's config folder #127

barakcoh opened this issue Mar 5, 2017 · 4 comments

Comments

@barakcoh
Copy link
Contributor

barakcoh commented Mar 5, 2017

Hi

We like to co-locate our Stories with the components they describe. Unfortunately this methodology broke in recent versions of react-native-storybook. I've traced the issue to projectRoots that seems to be pointing to the specified config folder.

If I add another projectRoot that points to the actual project (repo) root is the issue is gone. WDYT of such a solution? If you're good I'm more than happy to submit a PR.

@thani-sh
Copy link
Contributor

thani-sh commented Mar 5, 2017

Hi @barakcoh,
Thanks for creating the issue. Please go ahead and send the PR. I just want to verify something about using multiple project roots. Is react-native using the correct index.*.js files when using multiple project roots? It should always use the index files in storybook directory instead of those in project root.

@barakcoh
Copy link
Contributor Author

barakcoh commented Mar 6, 2017

Hi @mnmtanish

I opened the PR, having multiple index.*.js doesn't seem to be an issue. The correct index.*.js (the one from within my storybook folder) was picked up as the entrypoint by the packager.

@thani-sh
Copy link
Contributor

thani-sh commented Mar 6, 2017 via email

@thani-sh
Copy link
Contributor

thani-sh commented Mar 8, 2017

Published RN Storybook v2.2.4 with this fix

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

No branches or pull requests

2 participants