|
| 1 | +Welcome to `remix-the-web`! We're excited to have you contribute. |
| 2 | + |
| 3 | +This guide will help you get started. |
| 4 | + |
| 5 | +## Setting Up Your Environment |
| 6 | + |
| 7 | +To get started, you'll need `pnpm`. If you don't have it yet, you can [install `pnpm` here](https://pnpm.io/installation). |
| 8 | + |
| 9 | +If you're using [VS Code](https://code.visualstudio.com/), we recommend installing the [`node:test runner` extension](https://marketplace.visualstudio.com/items?itemName=connor4312.nodejs-testing) for a smooth testing experience. |
| 10 | + |
| 11 | +Once that's set up, run `pnpm install` to get all the project dependencies. You can then run `pnpm build` to build the project and `pnpm test` to run all tests. |
| 12 | + |
| 13 | +## Making Changes |
| 14 | + |
| 15 | +All our packages live in the [`packages` directory](https://github.com/mjackson/remix-the-web/tree/main/packages). At a minimum, each package typically includes: |
| 16 | + |
| 17 | +- `CHANGELOG.md`: A log of what's changed. |
| 18 | +- `package.json`: Package metadata and dependencies. |
| 19 | +- `README.md`: Information about the package. |
| 20 | + |
| 21 | +When you make changes to a package, please make sure you add a few relevant tests and run the whole test suite to make sure everything still works. Then, add a human-friendly description of your change in the changelog and [make a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request). We will take a look at it as soon as we can. |
| 22 | + |
| 23 | +## Releases |
| 24 | + |
| 25 | +Cutting releases is a 2-step process: |
| 26 | + |
| 27 | +- Update versions in package.json, jsr.json (if applicable), and the changelog and create a git tag |
| 28 | +- Publish new packages to npm/JSR and create a GitHub Release |
| 29 | + |
| 30 | +This repo includes a script for each step. |
| 31 | + |
| 32 | +To update versions and create a tag, use `pnpm run tag-release <packageName> <releaseType>`. For example, to create a `minor` release of the `headers` package, run: |
| 33 | + |
| 34 | +```sh |
| 35 | +pnpm run tag-release headers minor |
| 36 | +``` |
| 37 | + |
| 38 | +To publish the release you just tagged, use `pnpm run publish-release <tag>`. For example, if the tag that was created in the previous step was `[email protected]`, you'd run `pnpm run publish-release [email protected]`. |
| 39 | + |
| 40 | +The publish step runs in GitHub Actions if you just push the tag to GitHub: |
| 41 | + |
| 42 | +```sh |
| 43 | +git push origin main --tags |
| 44 | +``` |
0 commit comments