Skip to content

Commit bdc7ac8

Browse files
committed
chore: cleanup pnpm references
1 parent b0a489b commit bdc7ac8

File tree

2 files changed

+39
-36
lines changed

2 files changed

+39
-36
lines changed

examples/nuxt/nuxt-headlesswp-gravity-forms/README.md

Lines changed: 36 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,24 @@ This example shows you how to wire up a full headless WordPress backend—comple
2222
## Project Structure
2323

2424
```
25+
2526
```
27+
2628
example-app/
27-
├── components/ # Vue form-field components & barrel file
28-
├── composables/ # useGravityForm.js & useFormFields.js
29-
├── pages/ # Nuxt page (index.vue) that renders the form
30-
└── nuxt.config.ts # Nuxt application config
29+
├── components/ # Vue form-field components & barrel file
30+
├── composables/ # useGravityForm.js & useFormFields.js
31+
├── pages/ # Nuxt page (index.vue) that renders the form
32+
└── nuxt.config.ts # Nuxt application config
3133
wp-env/
32-
│ ├── db/
33-
│ │ └── database.sql # WordPress + Gravity Forms schema & data
34-
│ ├── setup/
35-
│ │ └── .htaccess # CORS + pretty-permalinks for wp-env
36-
│ └── uploads.zip # wp-content/uploads media files
37-
├── .wp-env.json # @wordpress/env configuration
38-
├── package.json # wp-env + Nuxt dev scripts
39-
```
34+
│ ├── db/
35+
│ │ └── database.sql # WordPress + Gravity Forms schema & data
36+
│ ├── setup/
37+
│ │ └── .htaccess # CORS + pretty-permalinks for wp-env
38+
│ └── uploads.zip # wp-content/uploads media files
39+
├── .wp-env.json # @wordpress/env configuration
40+
├── package.json # wp-env + Nuxt dev scripts
41+
42+
````
4043
4144
## Running the Example with wp-env
4245
@@ -51,33 +54,33 @@ wp-env/
5154
```bash
5255
git clone https://github.com/your-org/nuxt-gravityforms-example.git
5356
cd nuxt-gravityforms-example
54-
pnpm install
57+
npm install
5558
5659
echo "NUXT_PUBLIC_WORDPRESS_URL=http://localhost:8888" > example-app/.env
57-
```
60+
````
5861

5962
### Quick Start
6063

6164
1. Unzip uploads, start WP, import DB, then launch Nuxt:
6265

6366
```bash
64-
pnpm example:build
67+
npm run example:build
6568
```
6669

6770
2. Or run steps separately:
6871

6972
```bash
7073
# Start WP
71-
pnpm wp:start
74+
npm run wp:start
7275

7376
# Import DB
74-
pnpm wp:db:import
77+
npm run wp:db:import
7578

7679
# Unzip uploads
77-
pnpm wp:images:unzip
80+
npm run wp:images:unzip
7881

7982
# Start Nuxt dev server
80-
pnpm dev
83+
npm run dev
8184
```
8285

8386
By the end, you will have:
@@ -88,20 +91,20 @@ By the end, you will have:
8891

8992
## Scripts
9093

91-
| Command | Description |
92-
| ---------------------- | ---------------------------------------------------------------- |
93-
| `pnpm example:build` | Unzip media → start WP env → import DB → launch Nuxt dev server |
94-
| `pnpm example:start` | Start WP env, then Nuxt dev server |
95-
| `pnpm example:stop` | Stop the WordPress environment (wp-env stop) |
96-
| `pnpm example:prune` | Destroy & rebuild the WP environment, then restart—all in one go |
97-
| `pnpm wp:start` | @wordpress/env start (launches PHP/MySQL container with WP) |
98-
| `pnpm wp:stop` | @wordpress/env stop |
99-
| `pnpm wp:db:import` | Import the SQL dump into the running WP container |
100-
| `pnpm wp:db:export` | Export the current WP database back to wp-env/db/database.sql |
101-
| `pnpm wp:images:unzip` | Clear & unzip wp-env/uploads.zip → populates wp-content/uploads |
102-
| `pnpm dev` | Start the Nuxt 3 development server on port 3000 |
103-
104-
> **Tip:** You can also run any arbitrary WP-CLI command inside the container via `pnpm wp:cli -- <wp-cli-command>`
94+
| Command | Description |
95+
| ------------------------- | ---------------------------------------------------------------- |
96+
| `npm run example:build` | Unzip media → start WP env → import DB → launch Nuxt dev server |
97+
| `npm run example:start` | Start WP env, then Nuxt dev server |
98+
| `npm run example:stop` | Stop the WordPress environment (wp-env stop) |
99+
| `npm run example:prune` | Destroy & rebuild the WP environment, then restart—all in one go |
100+
| `npm run wp:start` | @wordpress/env start (launches PHP/MySQL container with WP) |
101+
| `npm run wp:stop` | @wordpress/env stop |
102+
| `npm run wp:db:import` | Import the SQL dump into the running WP container |
103+
| `npm run wp:db:export` | Export the current WP database back to wp-env/db/database.sql |
104+
| `npm run wp:images:unzip` | Clear & unzip wp-env/uploads.zip → populates wp-content/uploads |
105+
| `npm run dev` | Start the Nuxt 3 development server on port 3000 |
106+
107+
> **Tip:** You can also run any arbitrary WP-CLI command inside the container via `npm run wp:cli -- <wp-cli-command>`
105108
106109
## Database Access
107110

examples/nuxt/nuxt-headlesswp-gravity-forms/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
"name": "headlesswp-gravity-forms-nuxt-env",
33
"version": "1.0.0",
44
"scripts": {
5-
"example:build": "pnpm run frontend:install && pnpm run frontend:dev && pnpm run wp:start && pnpm run wp:db:import && pnpm run frontend:dev",
5+
"example:build": "npm run frontend:install && npm run frontend:dev && npm run wp:start && npm run wp:db:import && npm run frontend:dev",
66
"wp:start": "wp-env start",
77
"wp:stop": "wp-env stop",
88
"wp:destroy": "wp-env destroy --config .wp-env.json",
99
"wp:db:import": "wp-env run cli -- wp db import /var/www/html/db/database.sql",
1010
"wp:db:export": "wp-env run cli -- wp db export /var/www/html/db/database.sql",
11-
"frontend:install": "pnpm --prefix example-app/ install",
12-
"frontend:dev": "pnpm --prefix example-app/ dev",
11+
"frontend:install": "npm --prefix example-app/ install",
12+
"frontend:dev": "npm --prefix example-app/ dev",
1313
"start": "npm run wp:start && npm run frontend:dev"
1414
},
1515
"devDependencies": {

0 commit comments

Comments
 (0)