storybook-addon-mock icon indicating copy to clipboard operation
storybook-addon-mock copied to clipboard

V3: Create a monorepo and spearate the docs and the addon into different packages

Open nutboltu opened this issue 3 years ago • 4 comments
trafficstars

This is a large feature. This issue is aimed at completing the following tasks

  • create a monorepo with yarn workspaces
  • move the addon and the docs into separate packages
  • Move the readme into docs using storybook docs addon.
  • Improve the docs
    • Introduction, Installation, and User guide
    • Examples should be split into different packages e.g fetch, Axios, superagent, SWR
    • How to contribute
  • More tests
  • Use the Storybook addon kit tool
  • Supports parameters for each story. Currently, it only supports parameter per component.

nutboltu avatar May 18 '22 07:05 nutboltu

FYI, none of the tasks you mention in this issue require the docs to be separated from the addon using a monorepo.

Moving .storybook and stories into a docs folder would accomplish a similar "separation".

Monorepos are for combining multiple NPM packages into 1 git repo. And the docs aren't a NPM package. Why do you want to use a monorepo?

JohnAlbin avatar Jun 27 '22 03:06 JohnAlbin

Looks like this is being worked on in #112 so this discussion is probably moot

JohnAlbin avatar Jun 27 '22 03:06 JohnAlbin

@JohnAlbin thanks for raising your concern. I believe monorepo is not only for NPM packages but also to keep relevant repositories/projects into one and sometimes use the shared dependency. In this project, we have shared dependencies. Besides we are planning for a different approach to deploying storybook docs.

Moving .storybook and stories into a docs folder would accomplish a similar "separation".

It won't. We want to separate the package dependencies. The packages required only for docs shouldn't be a part of the addon package.

nutboltu avatar Jun 27 '22 05:06 nutboltu

Mixing development, testing and doc dependencies all inside devDependencies is pretty common. Only the addon's dependencies are inside the package.json's dependencies section, so they are already separated.

Just make sure you document the hell out of how to use yarn workspaces in this repo or you will severely limit the number of people who will be capable of contributing.

JohnAlbin avatar Jun 27 '22 08:06 JohnAlbin