Developing Codegen
Thank you for considering contributing to CodeGen! We welcome contributions from the community to make this project better.
Please take a moment to review this document to understand how to contribute effectively.
We expect all contributors to abide by our Code of Conduct. Please read it carefully before making any contributions.
Before you start contributing, ensure that you have idea of:
- TurboRepo to maintain all apps as single repo
- Next.js v14 for Docs website
- Node.js v20 for codegen-cli
- Typescript as language
-
To setup local development environment fork Codegen Repo.
-
Clone your Github forked repo:
git clone https://github.com/<your-username>/codegen.git
-
Go to codegen directory:
cd codegen
-
Install the the dependencies in root of the repo.
pnpm i
-
After that you can run app with the following.
pnpm dev:doc # for doc website dev server # or pnpm dev:cli # for cli in watch mode
-
To see the apps in dev:
- For doc site visit
http://localhost:3000
- For local CLI to use run:
pnpm dlx turbo link-pkg --filter=@codegen/cli
- After linking package to local store use:
cgen init # cgen -alias for codegen-cli
- For doc site visit
If you want to report a bug or raise a feature request please submit issue on Issue Tracker as per the template provided Bug Report Template, Feature Request Template.
- Create a new branch for your feature or bug fix:
git checkout -b feature/my-feature
orgit checkout -b bugfix/issue-number
. - Make your changes and ensure that the code follows the project's coding standards and guidelines.
- Write tests for any new functionality or changes.
- Run tests using
pnpm test
to ensure that they pass. - Commit your changes using descriptive commit messages:
git commit -m "feat: added new feature"
orgit commit -m "fix: resolved issue #123"
.
This repo uses changesets to make releasing updates easier. For you, the contributor, this means you should run
pnpm changeset
when you've got your changes ready. For more details, see this short document on adding a changeset.
- Push your changes to your forked repository:
git push origin feature/my-feature
orgit push origin bugfix/issue-number
.
- Open a pull request against the
main
branch of the original repository. - Ensure your pull request includes a clear title and description of the changes you made.
- Provide any additional information or context that could help with the review process.
- Request reviews from maintainers or specific contributors, if needed.
All contributions will go through code reviews. Be prepared to make any necessary changes based on the feedback received.
Thank you for contributing to RefLink a project by 0pen1labs!