Can this package be used outside of the sanity repo #186
-
I am creating a repo to easily create sanity instances with our component library, I would like to extend the functionality of |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
yes it can! it doesn't have any dependencies on sanity actually. it's a just normal NPM package you can install anywhere you do need to have your schema files available for code generator to read but if you wanted to lift those js schema files to some common repo (e.g. component lib repo) and import them in the studio code, that would result in the same codegen. alternatively, you could codegen types from your studio repo and then publish some sort of package that you could import in your component library repo. let me know if that makes sense |
Beta Was this translation helpful? Give feedback.
yes it can! it doesn't have any dependencies on sanity actually. it's a just normal NPM package you can install anywhere
you do need to have your schema files available for code generator to read but if you wanted to lift those js schema files to some common repo (e.g. component lib repo) and import them in the studio code, that would result in the same codegen.
alternatively, you could codegen types from your studio repo and then publish some sort of package that you could import in your component library repo.
let me know if that makes sense