Skip to content

Latest commit

Β 

History

History
115 lines (84 loc) Β· 2.95 KB

CONTRIBUTING.md

File metadata and controls

115 lines (84 loc) Β· 2.95 KB

Contributing to BlockNote Layout

Thank you for your interest in contributing! πŸŽ‰

πŸ“‹ Getting Started

  1. Fork the repository and clone your fork
  2. Install dependencies (pnpm workspace):
    pnpm install
  3. Build all packages:
    pnpm -r build

πŸ—οΈ Project Structure

This is a pnpm workspace β€” every block is its own npm package:

blocknote-layout/
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ blocknote-layout/ # Umbrella package re-exporting all blocks
β”‚   β”œβ”€β”€ extensions/       # Whiteboard + slideshow + mentions bundle
β”‚   β”œβ”€β”€ core/             # Shared utilities (blocknote-layout-core)
β”‚   β”œβ”€β”€ coderunner/       # Code runner block
β”‚   β”œβ”€β”€ genius/           # Genius AI block
β”‚   β”œβ”€β”€ mentions/         # Mention inline content
β”‚   β”œβ”€β”€ slideshow/        # Slideshow presentations
β”‚   └── whiteboard/       # Whiteboard block
β”œβ”€β”€ .github/workflows/    # CI/CD pipelines
β”œβ”€β”€ pnpm-workspace.yaml
└── package.json

Each package under packages/ has its own lib/ sources, vite.config.ts, and package.json.

πŸ”§ Development Workflow

Making Changes

  1. Create a feature branch:

    git checkout -b feature/my-awesome-feature
  2. Make your changes in the relevant packages/<block>/lib/

  3. Build to check for errors:

    pnpm -r build
  4. Commit your changes with a clear message:

    git commit -m "feat: improve code runner error handling"

Commit Message Convention

We follow Conventional Commits:

  • feat: description - New feature
  • fix: description - Bug fix
  • docs: description - Documentation changes
  • refactor: description - Code refactoring
  • chore: description - Maintenance tasks

πŸ“¦ Releasing

Releases are handled automatically via GitHub Actions when a version tag is pushed.

To release:

Versions are kept in lockstep β€” every package under packages/ shares the same version.

  1. Update the version in every packages/*/package.json:

    pnpm -r exec npm version 3.1.0 --no-git-tag-version
  2. Commit the version bump:

    git commit -am "chore: bump version to 3.1.0"
  3. Create and push a tag:

    git tag v3.1.0
    git push origin main --tags
  4. The GitHub Action will automatically build and publish all packages to npm.

πŸ“ Pull Request Process

  1. Ensure your code builds without errors
  2. Update documentation if needed
  3. Create a pull request with a clear description
  4. Wait for CI checks to pass
  5. Request review from maintainers

πŸ› Reporting Issues

Please use GitHub Issues to report bugs or request features. Include:

  • Which package (e.g. blocknote-layout-coderunner)
  • Version number
  • Steps to reproduce
  • Expected vs actual behavior

πŸ“„ License

By contributing, you agree that your contributions will be licensed under the MIT License.