Skip to content

Instantly share code, notes, and snippets.

@kmelve
Last active June 28, 2019 04:10
Show Gist options
  • Select an option

  • Save kmelve/b6ecf5e484500d8caf51db450c0182a7 to your computer and use it in GitHub Desktop.

Select an option

Save kmelve/b6ecf5e484500d8caf51db450c0182a7 to your computer and use it in GitHub Desktop.
Sanity Shema Snippets for VS Code
{
"sanity-schema": {
"prefix": "schema",
"body": [
"export default {\n name: '$1',\n type: '${2|document,object|}',\n title: '$1',\n fields: [\n $3\n ]\n}\n"
],
"description": "Makes a new Sanity schema"
},
"sanity-type": {
"prefix": "type",
"body": "{\n name: '$1',\n type: '$2',\n title: '$1',\n $3\n},",
"description": "Makes a new empty Sanity type"
},
"sanity-array": {
"prefix": "array",
"body": "{\n name: '$1',\n type: 'array',\n title: '$1',\n of: [\n $2\n]\n},\n",
"description": "Makes a new empty Sanity array type"
},
"sanity-object": {
"prefix": "object",
"body": "{\n name: '$1',\n type: 'object',\n title: '$1',\n fields: [\n $2\n]\n},\n",
"description": "Makes a new empty Sanity object type"
},
"sanity-string": {
"prefix": "string",
"body": "{\n name: '$1',\n type: 'string',\n title: '$1',\n options: [$2]\n},\n",
"description": "Makes a new empty Sanity string type"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment