You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/CONTRIBUTING.md
+35-7Lines changed: 35 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,17 +53,45 @@ After forking this repository, you'll want to [create a branch](https://docs.git
53
53
54
54
#### 3. Install dependencies and run the project locally
55
55
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
61
89
62
90
#### 4. Preview your changes
63
91
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`.
65
93
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.
67
95
68
96
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.
@@ -36,9 +36,9 @@ To run a local version of this project, please follow these simple steps.
36
36
### Prerequisites
37
37
38
38
- Node.js (Version: >=20.6)
39
-
- Use nvm for easy Node management
39
+
- Use nvm for easy Node management
40
40
- 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
42
42
43
43
### Set up
44
44
@@ -68,7 +68,7 @@ bun build:v2
68
68
bun dev:v2
69
69
```
70
70
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`.
72
72
73
73
examples:
74
74
@@ -77,11 +77,6 @@ examples:
77
77
78
78
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.
79
79
80
-
### Other development commands
81
-
82
-
-`bun format`: format the code
83
-
-`bun lint`: lint the code
84
-
85
80
### CI and testing
86
81
87
82
All pull-requests will be tested against both visual and performances testing to prevent regressions.
0 commit comments