Skip to content

Commit 2831e18

Browse files
authored
docs: update guides for pnpm workspace
1 parent 38d6bf8 commit 2831e18

File tree

1 file changed

+31
-6
lines changed

1 file changed

+31
-6
lines changed

README.md

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ It will run `$ wrangler pages deploy <PUBLISH_DIR> --project-name=<PROJECT_NAME>
3636

3737
```sh
3838
# npm
39-
$ npm install -D netlify-plugin-cloudflare-pages
39+
$ npm install -D netlify-plugin-cloudflare-pages-deploy
4040

4141
# yarn
42-
$ yarn add -D netlify-plugin-cloudflare-pages
42+
$ yarn add -D netlify-plugin-cloudflare-pages-deploy
4343

4444
# pnpm
45-
$ pnpm add -D netlify-plugin-cloudflare-pages
45+
$ pnpm add -D netlify-plugin-cloudflare-pages-deploy
4646
```
4747

4848
### Inputs
@@ -72,7 +72,7 @@ $ npx wrangler pages project create <PROJECT_NAME> --production-branch=main
7272
# for all deploy contexts (production, branch deploys, Deploy Previews).
7373

7474
[[plugins]]
75-
package = "netlify-plugin-cloudflare-pages"
75+
package = "netlify-plugin-cloudflare-pages-deploy"
7676
[plugins.inputs]
7777
package_exec = "pnpx"
7878
```
@@ -81,7 +81,7 @@ $ npx wrangler pages project create <PROJECT_NAME> --production-branch=main
8181
# for production deploy context. supports [`production`, `deploy-preview`, `branch-deploy`, `dev`]
8282

8383
[[context.production.plugins]]
84-
package = "netlify-plugin-cloudflare-pages"
84+
package = "netlify-plugin-cloudflare-pages-deploy"
8585
[context.production.plugins.inputs]
8686
package_exec = "pnpx"
8787
deploy_target_branch = "main"
@@ -93,8 +93,9 @@ Add `wrangler` to your project and use your lover package managers like`npm`, `y
9393

9494
This will make your build faster cause Netlify always caching dependencies and `wrangler` will be cached too.
9595

96+
#### For `yarn` and `yarn` Workspace
9697
```sh
97-
$ yarn add --dev wrangler
98+
$ yarn add -D wrangler
9899
```
99100

100101
```toml
@@ -104,6 +105,30 @@ $ yarn add --dev wrangler
104105
package_exec = "yarn"
105106
```
106107

108+
#### For `pnpm`
109+
```sh
110+
$ pnpm add -D wrangler
111+
```
112+
113+
```toml
114+
[[plugins]]
115+
package = "netlify-plugin-cloudflare-pages-deploy"
116+
[plugins.inputs]
117+
package_exec = "pnpm exec"
118+
```
119+
120+
#### For `pnpm` Workspace
121+
```sh
122+
$ pnpm add -D wrangler --filter <APP_NAME>
123+
```
124+
125+
```toml
126+
[[plugins]]
127+
package = "netlify-plugin-cloudflare-pages-deploy"
128+
[plugins.inputs]
129+
package_exec = "pnpm --filter <APP_NAME> -- exec"
130+
```
131+
107132
## For more information about:
108133

109134
- Deploy Context: https://docs.netlify.com/site-deploys/overview/#deploy-contexts

0 commit comments

Comments
 (0)