tldraw/CONTRIBUTING.md
2023-04-25 12:01:25 +01:00

2 KiB

Contributing

Thank you for your interest in contributing to tldraw! We welcome any contributions to the code base and the documentation.

Create an Issue!

Before jumping into the code, please create an issue to discuss your proposed changes. This will help us to make sure that your changes are aligned with the project goals and that you are not duplicating work that is already in progress.

If you are not sure whether your changes are needed, feel free to create an issue anyway and we can discuss it there. Once we have agreed on the changes, you can start working on them.

Environment

  • Ensure you have the latest version of Node and Yarn.
  • Run yarn to install all needed dev dependencies.

Making Changes

Pull requests are encouraged. If you want to add a feature or fix a bug:

  1. Fork and clone the repository
  2. Create a separate branch for your changes
  3. Make your changes, and ensure that it is formatted by Prettier and type-checks without errors in TypeScript
  4. Write tests that validate your change and/or fix.
  5. Run yarn build and then run tests with yarn test (for all packages) or yarn test:core (for only changes to the core @tldraw/tldraw package).
  6. For package changes, add docs inside the /packages/*/README.md. They will be copied on build to the corresponding /docs/packages/*/index.md file.
  7. Create a changeset by running yarn changeset. More info.
  8. Push your branch and open a PR. 🚀

Your PR will be reviewed and merged in within a day or two if everything looks good.