1.0.0 • Published 2 months ago

sanity-plugin-input-json v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

This is a Sanity Studio v3 plugin.

sanity-plugin-input-json

Simple JSON editor for Sanity Studio v3

Validates JSON on change and auto saves a serialised JSON string when valid.

Installation

npm install sanity-plugin-input-json

Usage

Add it as a plugin in sanity.config.ts (or .js):

import {defineConfig} from 'sanity'
import {inputJson} from 'sanity-plugin-input-json'

export default defineConfig({
  //...
  plugins: [inputJson({})],
})

Screenshots

Valid JSON

screenshot

Invalid JSON

screenshot

License

MIT © Duane Cilliers

Develop & test

This plugin uses @sanity/plugin-kit with default configuration for build & watch scripts.

See Testing a plugin in Sanity Studio on how to run this plugin with hotreload in the studio.

Release new version

Run "CI & Release" workflow. Make sure to select the main branch and check "Release new version".

Semantic release will only release on configured branches, so it is safe to run release on any branch.

1.0.0

2 months ago