@sanity/plugin-kit 2.1.14 → 2.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -26,12 +26,12 @@ Check the [FAQ](#faq) fro more on these.
26
26
  - [Verify plugin package](#verify-plugin-package)
27
27
  - [Upgrading a v2 plugin](#upgrading-a-v2-plugin)
28
28
  - [Upgrade help in v2 Studio](#upgrade-help-in-v2-studio)
29
- - [Inject config into existing v3 plugin](#inject-config-into-existing-v3)
29
+ - [Inject config into existing v3 plugin](#inject-config-into-existing-package)
30
30
  - [Testing a plugin in Sanity Studio](#testing-a-plugin-in-sanity-studio)
31
31
  - [Upgrading from plugin-kit 1.x](#upgrade-from-v1x-to-v2)
32
32
  - [FAQ](#faq) aka "Do I _have_ to use this plugin-kit?" aka No
33
33
  - [Configuration reference](#configuration-reference)
34
- - [Developing plugin-kit](#developing-plugin-kit)
34
+ - [Developing plugin-kit](#develop-plugin-kit)
35
35
 
36
36
  ## Installation
37
37
 
@@ -76,11 +76,6 @@ cd /path/to/my-studio
76
76
  npx yalc add sanity-plugin-testing-it-out && npx yalc link sanity-plugin-testing-it-out && npm install
77
77
  ```
78
78
 
79
- # Use this command if your studio uses yarn
80
- npx yalc add sanity-plugin-testing-it-out && npx yalc link sanity-plugin-testing-it-out && npm install
81
-
82
- ```
83
-
84
79
  Now, configure the plugin in sanity.config.ts (or .js) in Sanity Studio:
85
80
 
86
81
  ```ts
@@ -140,7 +135,10 @@ Each check will explain why it is needed, steps to fix it and how it can be indi
140
135
 
141
136
  ### What it is _not_
142
137
 
143
- `verify-package` is _not_ a codemod tool (yet). It will only check files and recommended settings: it will not change any files.
138
+ `verify-package` is _not_ a codemod tool. It will only check files and recommended settings: it will not change any files.
139
+
140
+ Consider using `npx @sanity/plugin-kit inject` if you want to add recommended V3 plugin configuration automatically.
141
+ See the [Inject docs](#inject-config-into-existing-package) for more on this.
144
142
 
145
143
  ### Upgrading a v2 plugin
146
144
 
@@ -178,16 +176,29 @@ npx @sanity/plugin-kit verify-package --studio --single
178
176
 
179
177
  This will only output the first validation that fails. Useful when working through the list of issues by fixing and rerunning the command.
180
178
 
181
- ### Inject config into existing v3
179
+ ## Inject config into existing package
182
180
 
183
- Consult the inject command CLI help:
181
+ ```
182
+ npx @sanity/plugin-kit inject
183
+ ```
184
+ will inject recommended V3 plugin package boilerplate into an existing plugin.
185
+ Be sure to commit any local changes before running this command, so you can easily revert anything
186
+ you dont want.
184
187
 
188
+ Consult the inject command CLI help:
185
189
  ```
186
190
  npx @sanity/plugin-kit inject --help
187
191
  ```
188
192
 
189
193
  for up-to-date specifics.
190
194
 
195
+ ### Presets
196
+
197
+ The inject command can do more work by adding presets. Consult the individual preset docs for details:
198
+
199
+ * [semver-workflow](./docs/semver-workflow.md) - Add an opinionated Github workflow to automate NPM releases
200
+ * [renovatebot](./docs/renovatebot.md) - Add opinionated Renovatebot config to make dependency management a breeze
201
+
191
202
  ## Testing a plugin in Sanity Studio
192
203
 
193
204
  Ensure you have the following script setup in package.json:
@@ -465,7 +476,7 @@ npm run test -- test/verify-package.test.ts
465
476
  npm run test -- test/verify-package.test.ts --snapshot
466
477
  ```
467
478
 
468
- ## Developing plugin kit
479
+ ## Develop plugin-kit
469
480
 
470
481
  ### Release new version
471
482
 
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/plugin-kit",
3
- "version": "2.1.14",
3
+ "version": "2.1.16",
4
4
  "description": "Enhanced Sanity.io plugin development experience",
5
5
  "keywords": [
6
6
  "sanity-io",
@@ -60,7 +60,7 @@ function addDevDependencies(options) {
60
60
  semantic-release preset injected.
61
61
 
62
62
  Please confer
63
- https://github.com/sanity-io/plugin-kit/blob/main/docs/semver-workflow.md
63
+ https://github.com/sanity-io/plugin-kit/blob/main/docs/semver-workflow.md#manual-steps-after-inject
64
64
  to finalize configuration for this preset.
65
65
  `.trim()));
66
66
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/plugin-kit",
3
- "version": "2.1.14",
3
+ "version": "2.1.16",
4
4
  "description": "Enhanced Sanity.io plugin development experience",
5
5
  "keywords": [
6
6
  "sanity-io",
@@ -65,7 +65,7 @@ async function addDevDependencies(options: InjectOptions) {
65
65
  semantic-release preset injected.
66
66
 
67
67
  Please confer
68
- https://github.com/sanity-io/plugin-kit/blob/main/docs/semver-workflow.md
68
+ https://github.com/sanity-io/plugin-kit/blob/main/docs/semver-workflow.md#manual-steps-after-inject
69
69
  to finalize configuration for this preset.
70
70
  `.trim()
71
71
  )