Skip to content

Commit

Permalink
refactor: ♻️ Completed codesplit and typescript refactor
Browse files Browse the repository at this point in the history
Refactored all code to improve readability as plugin development continues. Typescript types were added to all variables, including any `parts` modules to improve intellisense while developing. Function overloads and jsdoc comments were added for similar reasons. This refactor also included improvements to tag processing by implementing tag processing completely through observables with custom pipes.
  • Loading branch information
pcbowers committed Apr 2, 2022
1 parent 1eed9cd commit 443c4bd
Show file tree
Hide file tree
Showing 10 changed files with 771 additions and 432 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Dive into the [Options Section](#options) for more advanced use cases like prede
customLabel?: string
customValue?: string
allowCreate?: boolean
onCreate?: (inputValue: string) => GeneralTag
onCreate?: (inputValue: string) => Tag
reactSelectOptions?: {
[key: string]: any
}
Expand Down Expand Up @@ -219,7 +219,7 @@ export default {
title: 'Select your Tags',
type: 'array',
inputComponent: Input,
of: [{type: 'reference', to: [{type: 'mytag'}]}],
of: [{type: 'reference', to: [{type: 'myTagDocument'}]}],
options: {
...
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sanity-plugin-tags",
"version": "1.1.7",
"version": "1.2.0",
"description": "A multi-tag input for sanity studio",
"main": "lib/index.js",
"scripts": {
Expand Down
Loading

0 comments on commit 443c4bd

Please sign in to comment.