Skip to content

Commit 6a39c6f

Browse files
committed
rename preview:worker to preview
1 parent e1b3711 commit 6a39c6f

File tree

10 files changed

+25
-25
lines changed

10 files changed

+25
-25
lines changed

CONTRIBUTING.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@ Any contributions you make will be via [Pull Requests](https://docs.github.com/e
2525

2626
```sh
2727
> git remote -v
28-
origin https://github.com/<your-github-username>/opennextjs-cloudflare (fetch)
29-
origin https://github.com/<your-github-username>/opennextjs-cloudflare (push)
28+
origin https://github.com/<your-github-username>/opennextjs-cloudflare (fetch)
29+
origin https://github.com/<your-github-username>/opennextjs-cloudflare (push)
3030
```
3131

3232
- Add `opennextjs/opennextjs-cloudflare` as the `upstream` remote repository.
3333

3434
```sh
3535
> git remote add upstream https://github.com/opennextjs/opennextjs-cloudflare
3636
> git remote -v
37-
origin https://github.com/<your-github-username>/opennextjs-cloudflare (fetch)
38-
origin https://github.com/<your-github-username>/opennextjs-cloudflare (push)
39-
upstream https://github.com/opennextjs/opennextjs-cloudflare (fetch)
40-
upstream https://github.com/opennextjs/opennextjs-cloudflare (push)
37+
origin https://github.com/<your-github-username>/opennextjs-cloudflare (fetch)
38+
origin https://github.com/<your-github-username>/opennextjs-cloudflare (push)
39+
upstream https://github.com/opennextjs/opennextjs-cloudflare (fetch)
40+
upstream https://github.com/opennextjs/opennextjs-cloudflare (push)
4141
```
4242

4343
- You should regularly pull from the `main` branch of the `upstream` repository to keep up to date with the latest changes to the project.
@@ -82,13 +82,13 @@ pnpm --filter cloudflare build:watch
8282
Build and preview a Next.js sample application. For example, the `api` application:
8383

8484
```sh
85-
pnpm --filter api preview:worker
85+
pnpm --filter api preview
8686
```
8787

8888
You can skip building the Next.js app when it has not been modified, and only run the Cloudflare adaptor tool:
8989

9090
```sh
91-
SKIP_NEXT_APP_BUILD=true pnpm --filter api preview:worker
91+
SKIP_NEXT_APP_BUILD=true pnpm --filter api preview
9292
```
9393

9494
## Checking the code
@@ -102,7 +102,7 @@ pnpm run code:checks
102102
Attempt to auto-fix any issues with the format, lint and type checks:
103103

104104
```sh
105-
pnpm run code:fixes
105+
pnpm run fix
106106
```
107107

108108
## Testing the code
@@ -117,6 +117,7 @@ Run all the e2e tests, via Playwright:
117117

118118
```sh
119119
pnpm run e2e
120+
pnpm run e2e:dev
120121
```
121122

122123
## Changesets
@@ -127,15 +128,15 @@ We use the [`changesets`](https://github.com/changesets/changesets/blob/main/REA
127128
- Create a changeset for the current change.
128129

129130
```sh
130-
> pnpm changeset
131+
pnpm changeset
131132
```
132133

133134
- Select which workspaces are affected by the change and whether the version requires a major, minor or patch release.
134135
- Update the generated changeset with a description of the change.
135136
- Include the generate changeset in the current commit.
136137

137138
```sh
138-
> git add ./changeset/*.md
139+
git add ./changeset/*.md
139140
```
140141

141142
### Changeset message format

examples/api/e2e/playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export default defineConfig({
4747

4848
/* Run your local dev server before starting the tests */
4949
webServer: {
50-
command: "pnpm preview:worker",
50+
command: "pnpm preview",
5151
url: "http://localhost:8770",
5252
reuseExistingServer: !process.env.CI,
5353
timeout: 500_000,

examples/api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"lint": "next lint",
1111
"build:worker": "pnpm opennextjs-cloudflare",
1212
"dev:worker": "wrangler dev --port 8770 --inspector-port 9330",
13-
"preview:worker": "pnpm build:worker && pnpm dev:worker",
13+
"preview": "pnpm build:worker && pnpm dev:worker",
1414
"e2e": "playwright test -c e2e/playwright.config.ts",
1515
"e2e:dev": "playwright test -c e2e/playwright.dev.config.ts",
1616
"cf-typegen": "wrangler types --env-interface CloudflareEnv"

examples/create-next-app/e2e/playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export default defineConfig({
4747

4848
/* Run your local dev server before starting the tests */
4949
webServer: {
50-
command: "pnpm preview:worker",
50+
command: "pnpm preview",
5151
url: "http://localhost:8771",
5252
reuseExistingServer: !process.env.CI,
5353
timeout: 500_000,

examples/create-next-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"lint": "next lint",
1010
"build:worker": "opennextjs-cloudflare",
1111
"dev:worker": "wrangler dev --port 8771 --inspector-port 9331",
12-
"preview:worker": "pnpm build:worker && pnpm dev:worker",
12+
"preview": "pnpm build:worker && pnpm dev:worker",
1313
"e2e": "playwright test -c e2e/playwright.config.ts"
1414
},
1515
"dependencies": {

examples/middleware/e2e/playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export default defineConfig({
4747

4848
/* Run your local dev server before starting the tests */
4949
webServer: {
50-
command: "pnpm preview:worker",
50+
command: "pnpm preview",
5151
url: "http://localhost:8774",
5252
reuseExistingServer: !process.env.CI,
5353
timeout: 500_000,

examples/middleware/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"lint": "next lint",
99
"build:worker": "pnpm opennextjs-cloudflare",
1010
"dev:worker": "wrangler dev --port 8774 --inspector-port 9334",
11-
"preview:worker": "pnpm build:worker && pnpm dev:worker",
11+
"preview": "pnpm build:worker && pnpm dev:worker",
1212
"e2e": "playwright test -c e2e/playwright.config.ts",
1313
"e2e:dev": "playwright test -c e2e/playwright.dev.config.ts"
1414
},

examples/vercel-blog-starter/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"start": "next start",
88
"build:worker": "opennextjs-cloudflare",
99
"dev:worker": "wrangler dev --port 8773",
10-
"preview:worker": "pnpm build:worker && pnpm dev:worker"
10+
"preview": "pnpm build:worker && pnpm dev:worker"
1111
},
1212
"dependencies": {
1313
"classnames": "^2.5.1",

examples/vercel-commerce/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"test": "pnpm prettier:check",
1515
"tofix-build:worker": "opennextjs-cloudflare",
1616
"tofix-dev:worker": "wrangler dev --port 8772",
17-
"tofix-preview:worker": "pnpm build:worker && pnpm dev:worker"
17+
"tofix-preview": "pnpm build:worker && pnpm dev:worker"
1818
},
1919
"dependencies": {
2020
"@headlessui/react": "^2.1.2",

package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,19 @@
99
"prettier": "3.3.3"
1010
},
1111
"scripts": {
12+
"fix": "pnpm prettier:fix && pnpm lint:fix",
13+
"build": "pnpm --filter cloudflare build",
14+
"test": "pnpm -r test",
15+
"e2e": "pnpm build && pnpm -r e2e",
16+
"e2e:dev": "pnpm build && pnpm -r e2e:dev",
1217
"prettier:check": "prettier --check .",
1318
"prettier:fix": "prettier --write .",
1419
"lint:check": "pnpm -r lint:check",
1520
"lint:fix": "pnpm -r lint:fix",
16-
"fix": "pnpm prettier:fix && pnpm lint:fix",
1721
"ts:check": "pnpm -r ts:check",
18-
"test": "pnpm -r test",
1922
"code:checks": "pnpm prettier:check && pnpm lint:check && pnpm ts:check",
20-
"code:fixes": "pnpm prettier:fix && pnpm lint:fix",
2123
"install-playwright": "playwright install --with-deps",
2224
"postinstall": "pnpm --filter cloudflare build",
23-
"build": "pnpm --filter cloudflare build",
24-
"e2e": "pnpm build && pnpm -r e2e",
25-
"e2e:dev": "pnpm build && pnpm -r e2e:dev",
2625
"benchmark": "pnpm run --filter benchmarking benchmark"
2726
}
2827
}

0 commit comments

Comments
 (0)