Skip to content

Commit 4a295e6

Browse files
Update contributing guide (#3381)
1 parent 5726999 commit 4a295e6

File tree

2 files changed

+39
-16
lines changed

2 files changed

+39
-16
lines changed

.github/CONTRIBUTING.md

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,45 @@ After forking this repository, you'll want to [create a branch](https://docs.git
5353

5454
#### 3. Install dependencies and run the project locally
5555

56-
GitBook uses [Bun](https://bun.sh/) to run the project. Make sure you're using the specified version of `node` before running any of the development commands to ensure a smooth development experience.
57-
58-
You can easily do this by running the command `nvm use`.
59-
60-
To start your local version of GitBook, run the command `bun dev`.
56+
##### Prerequisites:
57+
- Node.js (Version: >=20.6)
58+
- Use `nvm` for easy Node management
59+
- [Bun](https://bun.sh/) (Version: >=1.2.15)
60+
- We use a text-based lockfile which isn't supported below 1.2.15
61+
62+
##### Setup steps:
63+
64+
1. Ensure you are using the project's version of Node:
65+
```bash
66+
nvm use
67+
```
68+
69+
2. Install dependencies using Bun:
70+
```bash
71+
bun install
72+
```
73+
74+
3. Build the project:
75+
```bash
76+
bun build:v2
77+
```
78+
79+
4. Start the development server:
80+
```bash
81+
bun dev:v2
82+
```
83+
84+
Additional development commands:
85+
- `bun format`: Format the code using Biome
86+
- `bun typecheck`: Run TypeScript type checking
87+
- `bun unit`: Run unit tests
88+
- `bun e2e`: Run end-to-end tests
6189

6290
#### 4. Preview your changes
6391

64-
When running the development server, published GitBook sites can be rendered through your local version at `http://localhost:3000/`.
92+
When running the development server, published GitBook sites can be rendered through your local version at `http://localhost:3000/url`.
6593

66-
For example, our published docs can be viewed using the local version by visiting `http://localhost:3000/gitbook.com/docs` after running the development server.
94+
For example, our published docs can be viewed using the local version by visiting `http://localhost:3000/url/gitbook.com/docs` after running the development server.
6795

6896
You can visit any published GitBook site behind your development server. Please make sure your site is [published publicly](https://gitbook.com/docs/published-documentation/publish-your-content-as-a-docs-site) to ensure you can view the site correctly in your development version.
6997

README.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<h1 align="center">GitBook</h1>
22

33
<p align="center">
4-
<a href="https://gitbook.com/docs/">Docs</a> - <a href="https://github.com/GitbookIO/community">Community</a> - <a href="https://developer.gitbook.com/">Developer Docs</a> - <a href="https://changelog.gitbook.com/">Changelog</a> - <a href="https://github.com/GitbookIO/gitbook/issues/new?assignees=&labels=bug&template=bug_report.md">Bug reports</a>
4+
<a href="https://gitbook.com/docs/">Docs</a> - <a href="https://github.com/GitbookIO/community">Community</a> - <a href="https://developer.gitbook.com/">Developer Docs</a> - <a href="https://changelog.gitbook.com/">Changelog</a> - <a href="https://github.com/GitbookIO/gitbook/issues/new?assignees=&labels=bug&template=bug_report.md">Bug reports</a> - <a href="https://github.com/orgs/GitbookIO/discussions/categories/feature-requests">Feature requests</a>
55
</p>
66

77
<p align="center">
@@ -36,9 +36,9 @@ To run a local version of this project, please follow these simple steps.
3636
### Prerequisites
3737

3838
- Node.js (Version: >=20.6)
39-
- Use nvm for easy Node management
39+
- Use nvm for easy Node management
4040
- Bun (Version: >=1.2.1)
41-
- We use a text-based lockfile which isn't supported below 1.2.1
41+
- We use a text-based lockfile which isn't supported below 1.2.1
4242

4343
### Set up
4444

@@ -68,7 +68,7 @@ bun build:v2
6868
bun dev:v2
6969
```
7070

71-
6. Open a published GitBook space in your web browser, prefixing it with `http://localhost:3000/`.
71+
6. Open a published GitBook space in your web browser, prefixing it with `http://localhost:3000/url`.
7272

7373
examples:
7474

@@ -77,11 +77,6 @@ examples:
7777

7878
Any published GitBook site can be accessed through your local development instance, and any updates you make to the codebase will be reflected in your browser.
7979

80-
### Other development commands
81-
82-
- `bun format`: format the code
83-
- `bun lint`: lint the code
84-
8580
### CI and testing
8681

8782
All pull-requests will be tested against both visual and performances testing to prevent regressions.

0 commit comments

Comments
 (0)