Skip to content

Commit

Permalink
docs: link to plugin-kit for dev and test
Browse files Browse the repository at this point in the history
  • Loading branch information
snorrees committed Jun 20, 2022
1 parent b96bc92 commit 05d2c61
Showing 1 changed file with 3 additions and 19 deletions.
22 changes: 3 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,26 +235,10 @@ MIT-licensed. See LICENSE.

## Develop & test

Make sure to run `npm run build` once, then run

```bash
npm run link-watch
```

In another shell, `cd` to your test studio and run:

```bash
npx yalc add sanity-plugin-asset-source-unsplash --link && yarn install
```

Now, changes in this repo will be automatically built and pushed to the studio,
triggering hotreload. Yalc avoids issues with react-hooks that are typical when using yarn/npm link.

### About build & watch

This plugin uses [@sanity/plugin-sdk](https://github.com/sanity-io/plugin-sdk)
This plugin uses [@sanity/plugin-kit](https://github.com/sanity-io/plugin-kit)
with default configuration for build & watch scripts.


See [Testing a plugin in Sanity Studio](https://github.com/sanity-io/plugin-kit#testing-a-plugin-in-sanity-studio)
on how to run this plugin with hotreload in the studio.


0 comments on commit 05d2c61

Please sign in to comment.