|
| 1 | +# Contributing |
| 2 | + |
| 3 | +This document provides guidelines for contributing to this project. |
| 4 | + |
| 5 | +## Getting started |
| 6 | + |
| 7 | +1. Fork or clone the repository |
| 8 | +2. Install dependencies: `npm install` |
| 9 | + |
| 10 | +## Development workflow |
| 11 | + |
| 12 | +1. **Create a feature branch** from `main` |
| 13 | +2. **Make your changes** following the [coding standards](#coding-standards) |
| 14 | +3. **Test your changes** thoroughly |
| 15 | +4. **Update documentation** if needed |
| 16 | +5. **Run code checks**: `lint` and `test` (if available) |
| 17 | +6. **Submit a pull request** with a clear description |
| 18 | + |
| 19 | +## Coding standards |
| 20 | + |
| 21 | +### Branch naming |
| 22 | + |
| 23 | +Use descriptive branch names and follow [Conventional Branch](https://conventional-branch.github.io/) guidelines. |
| 24 | + |
| 25 | +### Commit messages |
| 26 | + |
| 27 | +Follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) format |
| 28 | + |
| 29 | +### Code checks |
| 30 | + |
| 31 | +Repository has pre-commit code style and correctness checks. You can run them manually using `lint` and `format` scripts. |
| 32 | + |
| 33 | +## Releases |
| 34 | + |
| 35 | +To create a new release: |
| 36 | + |
| 37 | +1. **Bump the version**: Run `npm version {patch|minor|major}` to update the version number in `package.json` and create a Git commit and tag |
| 38 | + |
| 39 | + - `patch`: Bug fixes (0.2.0 → 0.2.1) |
| 40 | + - `minor`: New features (0.2.0 → 0.3.0) |
| 41 | + - `major`: Breaking changes (0.2.0 → 1.0.0) |
| 42 | + |
| 43 | +2. **Push changes**: Push the commit and tag to the repository: |
| 44 | + |
| 45 | + ```bash |
| 46 | + git push && git push --tags |
| 47 | + ``` |
| 48 | + |
| 49 | +3. **Create GitHub release**: Go to the [GitHub Releases](../../releases) page and: |
| 50 | + |
| 51 | + - Click "Create a new release" |
| 52 | + - Select the tag created in step 1 |
| 53 | + - Add release notes describing the changes |
| 54 | + - Click "Publish release" |
| 55 | + |
| 56 | +4. **Automatic npm publication**: Once the GitHub release is published, the package will be automatically published to npm via GitHub Actions workflow. |
| 57 | + |
| 58 | +> **Note**: Make sure you have the `NPM_TOKEN` secret configured in your repository settings for the npm publication to work. |
0 commit comments