Contributing

Contributing

How to contribute to Viber3D

Contributing to Viber3D

Thank you for your interest in contributing to Viber3D! This guide will help you understand how to contribute to the project.

Project Structure

Viber3D is organized as a monorepo with multiple packages:

  • viber3d - The main package published to npm

Development Setup

  1. Clone the repository:
    git clone https://github.com/instructa/viber3d.git
    cd viber3d
    
  2. Install dependencies:
    pnpm install
    
  3. Build the packages:
    pnpm build:packages
    

Pull Requests

When submitting a pull request:

  1. Fork the repository and create a new branch from main
  2. Make your changes and ensure all tests pass
  3. Submit a pull request to the main branch
  4. Ensure your PR has a clear description of the changes and why they're needed

For larger features, consider opening an issue first to discuss the approach.

Templates

Viber3D provides different templates for project initialization. These templates are stored in the templates directory of the repository.

  • The default template is the starter template
  • The starter-next template (accessed via the next branch) contains upcoming features and changes

When developing new templates or making changes to existing ones, you can test them locally by using the --template flag with the CLI:

npx viber3d@latest init my-game --template next

This will use the experimental template from templates/starter-next on the next branch.

Coding Standards

  • Follow the existing code style and conventions
  • Write tests for new features
  • Update documentation for any changes to the API or functionality

Commit Guidelines

We follow conventional commit messages to make the commit history more readable and to automate versioning:

  • feat: - A new feature
  • fix: - A bug fix
  • docs: - Documentation changes
  • style: - Changes that do not affect the meaning of the code
  • refactor: - Code changes that neither fix a bug nor add a feature
  • perf: - Performance improvements
  • test: - Adding or correcting tests
  • chore: - Changes to the build process or auxiliary tools

Need Help?

If you need help with contributing, please open an issue on GitHub or reach out to the maintainers.