styleguide
styleguide copied to clipboard
RFC: Monorepo
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
componentsfolder are actually the components and their builder. - inside the
sitefolder is the documentation of the components (importing from the components folder) and the builder of the documentation. - inside the
vtexiofolder are the files that will be built within the VTEX IO infrastructure using the builder-hub; Just likesite, this folder only imports files from thecomponentsfolder.
can I suggest to rename the site package to docs?
whatever, it is just a name for where the documentation will be, not only of the components, but of the complete Design System.
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