ts-vo-generator is a tool to generate TypeScript Value Objects from classes. This tool allows you to easily create immutable data structures in TypeScript by generating Value Objects based on constructor arguments.
Install ts-vo-generator globally using npm:
npm install -g ts-vo-generatorOr using Yarn:
yarn global add ts-vo-generatorTo use ts-vo-generator from the command line, run the following command:
npx ts-vo-generator <input_file> <output_directory><input_file>: Path to the TypeScript file containing the class definitions from which you want to generate Value Objects.<output_directory>: Path to the directory where the generated Value Objects will be output.
If a Value Object already exists in the output directory, the tool will prompt you to either overwrite the existing file or skip the operation.
Here's an example command to generate Value Objects from User.ts and output them to the ValueObjects directory:
npx ts-vo-generator ./src/models/User.ts ./src/ValueObjectsContributions to this project are welcome! Fork the GitHub repository and submit a pull request. Bug reports and feature requests are also appreciated.
This project is licensed under the MIT License. See the LICENSE file for details.
You can copy this Markdown text into your README.md file for `ts-vo-generator`. Feel free to customize it further with specific details about your library and its usage.
