Skip to content

Latest commit

 

History

History
88 lines (56 loc) · 3.1 KB

File metadata and controls

88 lines (56 loc) · 3.1 KB

Contributing to Callstack Rspress Theme

Development Process

All work on Callstack Rspress Theme happens directly on GitHub. Contributors send pull requests which go through review process.

Working on your first pull request? You can learn how from this free series: How to Contribute to an Open Source Project on GitHub.

  1. Fork the repo and create your branch from main (a guide on how to fork a repository).
  2. Run pnpm install to install all required dependencies.

Setup

This project uses a monorepo structure with pnpm workspaces:

  • packages/theme/ - Main theme package
  • packages/tester/ - Test site for development and testing

Local Development

  1. Start the development server for the theme package:

    pnpm --filter ./packages/theme dev
  2. Start the development server for the tester app:

    pnpm --filter ./packages/tester dev
  3. Open the tester app in your browser at http://localhost:3000

  4. Make changes to the theme components in packages/theme/src/

  5. Changes should be automatically reflected in the tester app

Linting & typechecking

Currently we use TypeScript for typechecking, Biome for linting and formatting the code.

  • pnpm lint: run Biome for linting and formatting
  • pnpm typecheck: run TypeScript type checking

Commit message convention

We prefix our commit messages with one of the following to signify the kind of change:

  • chore: Changes which don't affect the published packages or are not related to documentation or tests
  • docs: Documentation only changes
  • feat: A new feature
  • fix: A bug fix
  • perf: A code change that improves performance
  • refactor: A code change that neither fixes a bug nor adds a feature
  • test: Adding missing tests or correcting existing tests

Sending a pull request

When you're sending a pull request:

  • Prefer small pull requests focused on one change.
  • Verify that TypeScript, Biome and all tests are passing.
  • Preview the documentation to make sure it looks good.
  • Follow the pull request template when opening a pull request.

Publishing workflow

This part is for maintainers only, documenting steps to manually publish the packages with Changesets.

Stable version

  1. Pull latest changes for the stable branch.
  2. Run pnpm build to build the packages.
  3. Run pnpm changeset add to add an empty changeset.
  4. Run pnpm changeset version to update versions.
  5. Run pnpm lint to fix the formatting.
  6. Commit the changes with git commit -m "chore: changeset version".
  7. Run pnpm changeset publish to publish to npm.
  8. Generate release notes in the project's Release tab on GitHub.

Reporting issues

You can report issues on our bug tracker. Please follow the issue template when opening an issue.

License

By contributing to Callstack Rspress Theme, you agree that your contributions will be licensed under its MIT license.