Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ jobs:
registry-url: 'https://registry.npmjs.org'
cache: 'npm'

- name: Upgrade npm to latest
run: npm install -g npm@latest
- name: Upgrade npm to latest 11.x (newest major compatible with node 20)
run: npm install -g npm@11

- name: Verify npm version
run: npm --version
Expand Down Expand Up @@ -72,8 +72,8 @@ jobs:
registry-url: 'https://registry.npmjs.org'
cache: 'npm'

- name: Upgrade npm to latest
run: npm install -g npm@latest
- name: Upgrade npm to latest 11.x (newest major compatible with node 20)
run: npm install -g npm@11

- name: Install all npm packages
run: npm ci
Expand Down Expand Up @@ -105,8 +105,8 @@ jobs:
registry-url: 'https://registry.npmjs.org'
cache: 'npm'

- name: Upgrade npm to latest
run: npm install -g npm@latest
- name: Upgrade npm to latest 11.x (newest major compatible with node 20)
run: npm install -g npm@11

- name: Configure git user name and email
run: |
Expand Down
23 changes: 16 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The `develop` branch is the development branch which means it contains the next

## Local Environment

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.
This repository contains a local environment setup using the `@wordpress/env` package. The root package and the `example/` project are separate npm packages (not npm workspaces), so each needs its own `npm install`.

### Installation

Expand All @@ -38,7 +38,14 @@ From the repository root, run:
npm ci
```

This will install all dependencies for both the root package and the `example` workspace automatically.
Then build the main package and install the `example/` project's own dependencies (the example project depends on the built `dist/` output, so the build has to happen first):

```bash
npm run build
npm install --prefix example
```

Alternatively, running `npm run build-test-env` from the root will build the main package, install the `example/` dependencies, and build the example project for you.

### Building

Expand All @@ -48,15 +55,17 @@ To build the assets, run from the repository root:
npm run build
```

This will build both the main package and the example workspace. Alternatively, if you want to watch for changes during development, use:
This builds the main package only. To also build the example project, run:

```bash
npm run start
npm run build --prefix example
```

You can also build workspaces individually if needed:
- From root: `npm run build` (builds main package)
- From example: `npm run build` (builds example workspace)
If you want to watch for changes during development, use:

```bash
npm run start
```

### Starting the Local Environment

Expand Down
Loading
Loading