Skip to content

Commit bedd7e6

Browse files
chore: sync CONTRIBUTING.md between projects (#1237)
1 parent 4f5c429 commit bedd7e6

File tree

1 file changed

+67
-24
lines changed

1 file changed

+67
-24
lines changed

CONTRIBUTING.md

+67-24
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,47 @@ If you are here to suggest a feature, first create an issue if it does not alrea
1717
If you have been assigned to fix an issue or develop a new feature, please follow these steps to get started:
1818

1919
- Fork this repository.
20-
- Install dependencies by running `$ pnpm install`.
21-
- We use [pnpm](https://pnpm.io/) v7 for package management.
22-
- We use [nvm](https://github.com/nvm-sh/nvm) to manage node versions - please make sure to use the version mentioned in `.nvmrc`.
23-
- Run development server using `pnpm run watch`.
20+
- Install dependencies
21+
22+
```bash
23+
pnpm install
24+
```
25+
26+
- We use [pnpm](https://pnpm.io/) v9 for package management (run in case of pnpm-related issues).
27+
28+
```bash
29+
corepack enable && corepack prepare
30+
```
31+
32+
- We use [nvm](https://github.com/nvm-sh/nvm) to manage node versions - please make sure to use the version mentioned in `.nvmrc`
33+
34+
```bash
35+
nvm use
36+
```
37+
38+
- Build all packages.
39+
40+
```bash
41+
pnpm build:all
42+
```
43+
44+
- Run development server.
45+
46+
```bash
47+
pnpm run watch
48+
```
49+
2450
- Implement your changes and tests to files in the `src/` directory and corresponding test files.
2551
- Document your changes in the appropriate doc page.
2652
- Git stage your required changes and commit (see below commit guidelines).
2753
- Submit PR for review.
2854

2955
### Editing the docs locally and previewing the changes
3056

31-
The documentations for all the TanStack projects are hosted on [tanstack.com](https://tanstack.com), which is a Remix application (https://github.com/TanStack/tanstack.com). You need to run this app locally to preview your changes in the `TanStack/form` docs.
57+
The documentations for all the TanStack projects are hosted on [tanstack.com](https://tanstack.com), which is a TanStack Start application (https://github.com/TanStack/tanstack.com). You need to run this app locally to preview your changes in the `TanStack/form` docs.
3258

3359
> [!NOTE]
34-
> The Remix app fetches the doc pages from GitHub in production, and searches for them at `../form/docs` in development. Your local clone of `TanStack/form` needs to be in the same directory as the local clone of `TansStack/tanstack.com`.
60+
> The website fetches the doc pages from GitHub in production, and searches for them at `../form/docs` in development. Your local clone of `TanStack/form` needs to be in the same directory as the local clone of `TansStack/tanstack.com`.
3561

3662
You can follow these steps to set up the docs for local development:
3763

@@ -85,13 +111,23 @@ https://github.com/fulopkovacs/form/assets/43729152/9d35a3c3-8153-4e74-9cb2-af27
85111

86112
### Running examples
87113

88-
- Make sure you've installed the dependencies by running `$ pnpm install` in the repo's root directory.
89-
- If you want to run the example against your local changes, run `pnpm run watch` in the repo's root directory. Otherwise, it will be run against the latest TanStack Form release.
90-
- Run `pnpm run dev` in the selected examples' directory.
114+
- Make sure you've installed the dependencies in the repo's root directory.
115+
116+
```bash
117+
pnpm install
118+
```
119+
120+
- If you want to run the example against your local changes, run below in the repo's root directory. Otherwise, it will be run against the latest TanStack Form release.
121+
122+
```bash
123+
pnpm run watch
124+
```
91125
92-
#### Note on `examples/react-native`
126+
- Run below in the selected examples' directory.
93127

94-
React Native example requires Expo to work. Please follow the instructions from example's README.md file to learn more.
128+
```bash
129+
pnpm run dev
130+
```
95131

96132
#### Note on standalone execution
97133

@@ -103,8 +139,17 @@ You can use Gitpod (An Online Open Source VS Code like IDE which is free for Ope
103139
104140
- clone the `TanStack/form` repo.
105141
- install all the dependencies in `/` and `/docs`.
106-
- run `npm start` in the root(`/`) to Auto-build files.
107-
- run `npm run dev` in `/docs`.
142+
- run below in the root(`/`) to Auto-build files.
143+
144+
```bash
145+
npm start
146+
```
147+
148+
- run below in `/docs`.
149+
150+
```bash
151+
npm run dev
152+
```
108153
109154
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/TanStack/form)
110155
@@ -119,7 +164,7 @@ We have very precise rules over how our git commit messages can be formatted. Th
119164
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
120165
format that includes a **type**, a **scope** and a **subject**:
121166
122-
```
167+
```text
123168
<type>(<scope>): <subject>
124169
<BLANK LINE>
125170
<body>
@@ -138,17 +183,15 @@ Must be one of the following:
138183
- **feat**: A new feature
139184
- **fix**: A bug fix
140185
- **docs**: Documentation only changes
141-
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing
142-
semi-colons, etc)
186+
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
143187
- **refactor**: A code change that neither fixes a bug nor adds a feature
144188
- **perf**: A code change that improves performance
145189
- **test**: Adding missing or correcting existing tests
146-
- **chore**: Changes to the build process or auxiliary tools and libraries such as documentation
147-
generation
190+
- **chore**: Changes to the build process or auxiliary tools and libraries such as documentation generation
148191
149192
### Scope
150193
151-
The scope could be anything specifying place of the commit change. For example `useForm`, `useMutation` etc...
194+
The scope could be anything specifying place of the commit change. For example `form-core`, `react-form` etc...
152195
153196
You can use `*` when the change affects more than a single scope.
154197
@@ -174,11 +217,11 @@ The footer should contain any information about **Breaking Changes** and is also
174217

175218
Here is an example of the release type that will be done based on a commit messages:
176219

177-
| Commit message | Release type |
178-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------- |
179-
| `fix(pencil): stop graphite breaking when too much pressure applied` | Patch Release |
180-
| `feat(pencil): add 'graphiteWidth' option` | ~~Minor~~ Feature Release |
181-
| `perf(pencil): remove graphiteWidth option`<br><br>`BREAKING CHANGE: The graphiteWidth option has been removed.`<br>`The default graphite width of 10mm is always used for performance reasons.` | ~~Major~~ Breaking Release |
220+
| Commit message | Release type |
221+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- |
222+
| fix(pencil): stop graphite breaking when too much pressure applied | Patch Release |
223+
| feat(pencil): add `graphiteWidth` option | ~~Minor~~ Feature Release |
224+
| perf(pencil): remove `graphiteWidth` option<br/><br/>BREAKING CHANGE: The `graphiteWidth` option has been removed.<br/>The default graphite width of 10mm is always used for performance reasons. | ~~Major~~ Breaking Release |
182225

183226
### Revert
184227

0 commit comments

Comments
 (0)