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: CONTRIBUTING.md
+37-3Lines changed: 37 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,11 +28,45 @@ The `develop` branch is the development branch which means it contains the next
28
28
29
29
## Local Environment
30
30
31
-
This repository contains a local environment setup using the `@wordpress/env` package. Before you can start that environment you will need to run `npm ci` in both the repository root and `example`directory. This will install the required dependencies.
31
+
This repository contains a local environment setup using the `@wordpress/env` package and uses npm workspaces to manage dependencies for both the root package and the `example`workspace.
32
32
33
-
Next, run `npm run build` in both the root and `example` directories to build and compile the needed assets or if you want to watch for changes instead, use `npm run start`.
33
+
### Installation
34
34
35
-
Lastly, navigate your terminal to the `example` directory and run `npm run wp-env start` to start the local environment. The environment should be available at [http://localhost:8888](http://localhost:8888) and the credentials to login to the admin are: `admin``password`.
35
+
From the repository root, run:
36
+
37
+
```bash
38
+
npm ci
39
+
```
40
+
41
+
This will install all dependencies for both the root package and the `example` workspace automatically.
42
+
43
+
### Building
44
+
45
+
To build the assets, run from the repository root:
46
+
47
+
```bash
48
+
npm run build
49
+
```
50
+
51
+
This will build both the main package and the example workspace. Alternatively, if you want to watch for changes during development, use:
52
+
53
+
```bash
54
+
npm run start
55
+
```
56
+
57
+
You can also build workspaces individually if needed:
58
+
- From root: `npm run build` (builds main package)
59
+
- From example: `npm run build` (builds example workspace)
60
+
61
+
### Starting the Local Environment
62
+
63
+
From the repository root, run:
64
+
65
+
```bash
66
+
npm run start-test-env
67
+
```
68
+
69
+
This will start the WordPress environment and import test media. The environment should be available at [http://localhost:8888](http://localhost:8888) and the credentials to login to the admin are: `admin``password`.
0 commit comments