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
+14-25
Original file line number
Diff line number
Diff line change
@@ -4,41 +4,34 @@ Thanks for your interest in contributing to Inertia.js!
4
4
5
5
## Packages
6
6
7
-
To make local Inertia.js development easier, this project has been setup as a monorepo using [NPM Workspaces](https://docs.npmjs.com/using-npm/workspaces). To set it up, start by cloning the repository on your system.
7
+
To make local Inertia.js development easier, this project has been setup as a monorepo using [pnpm](https://pnpm.io/workspaces). To set it up, start by cloning the repository on your system.
Next, install the JavaScript dependencies and build the packages:
15
15
16
16
```sh
17
-
npm install
17
+
pnpm install&& pnpm build
18
18
```
19
19
20
-
Next, build the packages:
20
+
If you're making changes to one of the packages, you can setup a watcher to automatically run the build step whenever files are changed.
21
21
22
22
```sh
23
-
npm run build --workspace=packages --if-present
23
+
pnpm watch
24
24
```
25
25
26
-
If you're making changes to one of the packages that requires a build step (`core`, `react`, `vue2`, `vue3`), you can setup a watcher to automatically run the build step whenever files are changed.
27
-
28
-
```sh
29
-
cd packages/core
30
-
npm run dev
31
-
```
32
-
33
-
When proposing changes to one of the adapters (`react`, `vue2`, `vue3`, `svelte`), please try to apply the same changes to the other adapters where possible.
26
+
When proposing changes to one of the adapters, please try to apply the same changes to the other adapters where possible.
34
27
35
28
## Playgrounds
36
29
37
30
It's often helpful to develop Inertia.js using a real application. The playground folder contains an example Laravel project for each of the adapters. Here's how to get a playground running:
38
31
39
32
```sh
40
33
cd playgrounds/react
41
-
npm run build
34
+
pnpm build
42
35
composer install
43
36
cp .env.example .env
44
37
php artisan key:generate
@@ -49,30 +42,26 @@ php artisan serve
49
42
To automatically see changes to the JavaScript files in the browser, start the development server:
50
43
51
44
```sh
52
-
npm run dev
45
+
pnpm dev
53
46
```
54
47
55
48
To test the SSR mode, first run the build, and then start the SSR server:
56
49
57
50
```sh
58
-
npm run build
51
+
pnpm build
59
52
php artisan inertia:start-ssr
60
53
```
61
54
62
55
## Testing
63
56
64
-
Inertia.js uses [Playwright](https://playwright.dev/) for testing. To run the tests, use the following command:
65
-
66
-
```sh
67
-
cd tests && npx playwright test
68
-
```
57
+
Inertia.js uses [Playwright](https://playwright.dev/) for testing. To run the tests, use the `pnpm test` command.
69
58
70
59
## Publishing
71
60
72
61
This section is really for the benefit of the core maintainers.
73
62
74
-
1. Increment the version numbers in the `package.json` file for each package, making sure to also update the adapter dependencies on `@inertiajs/core`.
75
-
2. Run `npm install` to update the top-level `package-lock.json` file.
76
-
3. Update `CHANGELOG.md`.
77
-
4. Run `npm publish` for each package. This will automatically run the necessary build step. When publishing beta releases, make sure to run `npm publish --tag=beta` or `npm publish --tag=next` if it's `next`.
63
+
1. Increment the version numbers in the `package.json` file for each package,
64
+
2. Run `pnpm install`,
65
+
3. Update `CHANGELOG.md`,
66
+
4. Run `pnpm publish -r` in the root directory. This will automatically run the necessary build steps and publish all packages. When publishing beta releases, make sure to run `pnpm publish -r --tag=beta` or `npm publish -r --tag=next` if it's `next`,
78
67
5. Add release notes to [GitHub](https://github.com/inertiajs/inertia/releases).
0 commit comments