laws-africa / law-widgets

Web components for Akoma Ntoso documents
GNU General Public License v3.0
0 stars 0 forks source link

Investigations before work on on la-widgets #159

Closed musangowope closed 2 years ago

musangowope commented 2 years ago
musangowope commented 2 years ago

Feedback from the investigation:

Investigate how to use Lerna for incremental versioning and packaging of nx packages.

Using Lerna and lerna publish automates the versioning process for all your packages. It gives you various version-changing options: Breaking change, patch, minor change, custom version etc. Upon choosing an option, each packages' version will be incremented accordingly, along with tagging, change logging, publishing

The state of packages with lerna mono repo space. Package dependencies. Node module depuplication?

Each package has its own node_modules. If packages share common node_module dependencies, Lerna offers the command lerna bootstrap --hoist, which hoists common node_modules to the top part of the package. Need to look into: lerna bootstrap. Currently doesn't work aspected on my project, had to use a work around
Lerna provides options for symlinking if packages depend on each other.

Handling tests. Is it is to have a command to run tests for packages before publishing

you can use lerna test, then Lerna run the associated test for each package if a test script exists in package.json

Vue3 component integration

it is possible. https://stenciljs.com/docs/vue

Final thoughts: Lerna is a handy tool for handling monorepos (Publishing, versioning, tagging, symlinking, dependencies). In stencil vue integration guide, they use lerna for the mono repo setup, so I take that as evidence as a preferable tool to use.

Caution: Maintenance of the repo has transferred to the Nrwl team, which leaves me with the perception that alot of changes are happening (fixes and evolving docs).

musangowope commented 2 years ago

I have put together a small of what this repo can look https://github.com/musangowope/experimentations-repo/tree/main/mono-repo-lib @longhotsummer I think this is a good point to have a discussion for plans moving forward based on the research I have done. Let me know what time suits you best to chat