types-ddd icon indicating copy to clipboard operation
types-ddd copied to clipboard

Proposal: Splitting Components (Value Objects) into Individual Packages

Open 4lessandrodev opened this issue 9 months ago • 2 comments

Currently

the types-ddd library provides several components (value objects) in a single package. However, it would be beneficial for users if these components were made available in individual packages, allowing users to install only the components they actually need.

For example, one user might only need the cpf component, while another might only need the cnpj component. Allowing the individual installation of each component would provide a more flexible and lean experience for users.

I suggest that the types-ddd library be split into individual packages for each component (value object), so that users can install all components or just the specific ones they need. This would also make maintenance and evolution of each component separately easier.

Proposal:

Split the types-ddd library into individual packages for each component (value object). Update the documentation to reflect this change and provide clear instructions on how to install the components individually or all at once.

Usage Example:


# Installation of all value-objects
npm install @types-ddd/core

# Installation of a specific value object (example: money)
npm install @types-ddd/currency

This division will allow users to have more control over which package they want to use, reducing the installation size and improving the flexibility of using the types-ddd library.

4lessandrodev avatar Apr 29 '24 20:04 4lessandrodev

Base Project

4lessandrodev avatar Apr 29 '24 20:04 4lessandrodev


.
+-- package.json
`-- packages
   +-- money
   |   `-- package.json
   `-- email
       `-- package.json

4lessandrodev avatar Apr 29 '24 20:04 4lessandrodev