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

docs: what are the differences between main.js, preview.js, manager.js? #9594

Closed
lidoravitan opened this issue Jan 22, 2020 · 9 comments
Closed

Comments

@lidoravitan
Copy link

lidoravitan commented Jan 22, 2020

Issue

Can't find any documentation about what the difference between main.js, preview.js, manager.js.
when should I use/choose each one? what are their lifecycle (I mean do they load before/after the env)?

@shilman
Copy link
Member

shilman commented Jan 23, 2020

@lidoravitan can you review this PR and add questions as comments there?

@lidoravitan
Copy link
Author

@shilman sure I'm on it! thanks for response

@stale
Copy link

stale bot commented Feb 15, 2020

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@stale stale bot added the inactive label Feb 15, 2020
@shilman shilman removed the inactive label Feb 16, 2020
@shilman shilman closed this as completed Feb 16, 2020
@goepi
Copy link

goepi commented Mar 18, 2020

What are after all the differences between all these different files???

It's nowhere to be found in the docs. Take "Using addons" for example; the docs say to add something to main.js, then later in a section entitled "global configuration" it says "To do that, you can add your decorators to a config file, typically in .storybook/preview.js.", but nowhere is it explained what "typically" even means.

I don't know what I should put in preview.js vs main.js

@shilman
Copy link
Member

shilman commented Mar 23, 2020

cc @ndelangen

@ndelangen
Copy link
Member

Here's where it's explained, but it's missing in the docs for some reason:
https://github.com/storybookjs/storybook/blob/next/docs/src/pages/configurations/overview/index.md

@ndelangen
Copy link
Member

@shilman do we deploy the docs for next somewhere somehow?

@shilman
Copy link
Member

shilman commented Mar 23, 2020

@ndelangen No because of the whole "frontpage" / "docs" split. I think we need to patch that into master. It came in on this PR, but didn't have the patch label:

#9552

I'll do the patch now. Thanks!

@sme3x
Copy link

sme3x commented Sep 14, 2020

You have it all nicely explained here by @shilman - Migration docs

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

5 participants