styleguide icon indicating copy to clipboard operation
styleguide copied to clipboard

RFC: Monorepo

Open emersonlaurentino opened this issue 5 years ago • 3 comments

Using mono-repository to separate the documentation and builder-hub components, many of our current dependencies are due to the documentation.

Possible structure of the monorepo:

packages
├── components
│   └── src
│       └── Button
│           ├── tests
│           │   ├── snapshots
│           │   │   └── index.test.tsx.snap
│           │   └──index.test.tsx
│           └── index.tsx
├── site
└── vtexio
    └── react
        └── Button.tsx
  • inside the components folder are actually the components and their builder.
  • inside the site folder is the documentation of the components (importing from the components folder) and the builder of the documentation.
  • inside the vtexio folder are the files that will be built within the VTEX IO infrastructure using the builder-hub; Just like site, this folder only imports files from the components folder.

emersonlaurentino avatar Feb 18 '20 15:02 emersonlaurentino

can I suggest to rename the site package to docs?

lucasecdb avatar Feb 18 '20 16:02 lucasecdb

whatever, it is just a name for where the documentation will be, not only of the components, but of the complete Design System.

emersonlaurentino avatar Feb 18 '20 16:02 emersonlaurentino

I've gave this a try some time ago and made a little POC: https://github.com/vtex/styleguide/tree/refactor/monorepo+lerna+workspaces if it helps anyone

kaisermann avatar Feb 19 '20 17:02 kaisermann