Adopt the monorepo architecture
Adopted Monorepo architecture with PNPM
Proposed Changes
updated the mono repo architecture using pnpm workspaces,
- [ ] Bug(s) fixed
- [x] Enhancement done
- [ ] New Feature(s) added
- [x] Documentation changed
- [ ] All new and existing tests passed.
- [ ] My code follows the code style of this project.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| love-simple-ui | ❌ Failed (Inspect) | May 24, 2023 5:03pm |
Adoption to a monorepo
- We are splitting the project into two zones
appsthat contain our products andpackagesthat contain our ui-library (standard convention) - Inside
packages/reactwe have the@love-simple-ui/reactlibrary, the npm package name is to be changed. (this has many advantages as mentioned below) - Inside
apps/docswe have our docs next app which consumes out component library.
Executing npm scripts
from the root directory execute
pnpm run react <script-name from packages/react/package.json>
To execute scripts inside UI library such as ladle, tsup etc.
pnpm run docs <script-name from apps/docs/package.json>
To execute scripts inside next app such as dev, build etc.
Note Changing the library name to a namespaced package name is a general convention, we can namespace all our modules and if we plan to include other frameworks such as vue, svelte we can simply add those to packages and publish them at ease
I will deploy the changes by tmw.