File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -57,8 +57,26 @@ npx @sanity/plugin-kit init sanity-plugin-testing-it-out
57
57
cd sanity-plugin-testing-it-out
58
58
npm run link-watch
59
59
60
- # In another shell, link the plugin to your Sanity studio using the command indicated by link-watch
60
+ # In another shell
61
61
cd /path/to/my-studio
62
+ # now link the plugin to your Sanity studio using the command indicated by link-watch output (see below)
63
+ ```
64
+
65
+ Run ** ONE** of the below commands, ** based on the package manager** used in your studio:
66
+
67
+ ``` bash
68
+ # studio uses yarn
69
+ cd /path/to/my-studio
70
+ yalc add --link sanity-plugin-testing-it-out && yarn install
71
+ ```
72
+
73
+ ``` bash
74
+ # studio uses npm
75
+ cd /path/to/my-studio
76
+ npx yalc add sanity-plugin-testing-it-out && npx yalc link sanity-plugin-testing-it-out && npm install
77
+ ```
78
+
79
+ # Use this command if your studio uses yarn
62
80
npx yalc add sanity-plugin-testing-it-out && npx yalc link sanity-plugin-testing-it-out && npm install
63
81
64
82
```
Original file line number Diff line number Diff line change @@ -72,7 +72,15 @@ export async function linkWatch({basePath}: {basePath: string}) {
72
72
outdent `
73
73
Watching ${ watch . folder } for changes to files with extensions: ${ watch . extensions }
74
74
75
- To test this package in another repository directory run:
75
+ To test this package in Sanity Studio or another package, in a separate shell run:
76
+ cd /path/to/sanity/studio-or-package
77
+
78
+ Then, run one of the below commands, based on the package manager used in studio-or-package:
79
+
80
+ ## yarn
81
+ ${ chalk . greenBright ( `yalc add --link ${ pkg . name } && yarn install` ) }
82
+
83
+ ## npm
76
84
${ chalk . greenBright ( `npx yalc add ${ pkg . name } && npx yalc link ${ pkg . name } && npm install` ) }
77
85
` . trimStart ( )
78
86
)
You can’t perform that action at this time.
0 commit comments