love-simple-ui icon indicating copy to clipboard operation
love-simple-ui copied to clipboard

Adopt the monorepo architecture

Open naveeng2402 opened this issue 2 years ago • 3 comments

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.

naveeng2402 avatar May 24 '23 17:05 naveeng2402

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

vercel[bot] avatar May 24 '23 17:05 vercel[bot]

Adoption to a monorepo

  • We are splitting the project into two zones apps that contain our products and packages that contain our ui-library (standard convention)
  • Inside packages/react we have the @love-simple-ui/react library, the npm package name is to be changed. (this has many advantages as mentioned below)
  • Inside apps/docs we 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

naveeng2402 avatar May 24 '23 17:05 naveeng2402

I will deploy the changes by tmw.

thekavikumar avatar May 24 '23 17:05 thekavikumar