1.0 Roadmap
See original GitHub issueEdit May 9th, 2021: This issue now represents the 1.0 roadmap!
There has been a lot of development since the first release of this lib and the next version of this lib has a lot coming. The project will now be divided up into different sub-packages:
@sanity-codegen/schema-codegen
— code generation and extraction for sanity schemas@sanity-codegen/groq-codegen
— code generation and extraction or GROQ queries in code@sanity-codegen/client
— thin wrapper client that augments@sanity/client
for GROQ codegen@sanity-codegen/types
— a separate, no-deps package for shared types@sanity-codegen/cli
— a new CLI powered by oclif@sanity-codegen/jamstack-client
— a specialized client intended for use in jamstack apps. Will include preview mode logic
Edit July 12th, 2021: See here 👉 https://github.com/ricokahler/sanity-codegen/issues/5#issuecomment-877925182
✨ Features
Here are a list of features that are slotted for 1.0:
Schema Codegen:
- schema extractor — a new API for extracting sanity schemas from sanity studio setups (shims our a browser environment)
- schema normalizer/validator (in-development) — a new API for taking in sanity schemas and normalizing them for easier use in schema codegen
- refined schema codegen — a re-write of the schema codegen using the new normalizer.
- support for additional types — See #6
- support weak references — Some references are weak and thus when expanding them, they should be defined as
T | null
GROQ Codegen:
- GROQ to TS transform — a new API to transform GROQ ASTs into TS ASTs
- GROQ plucker/extractor (but buggy) — a new API to parse typescript or javascript files for GROQ queries
- GROQ codegen API — a new API that ties the above two APIs
Client wrapper:
- client wrapper — a wrapper for existing sanity clients (e.g.
@sanity/client
,picosanity
) that augment their APIs for use with GROQ codegen
Jamstack client:
Note: This client is the successor to the current client. You may not need this package if you plan on using sanity-codegen with just the client wrapper
- Compatibility with the client wrapper
- Refined preview mode
CLI:
- Refined CLI with help commands (via oclif)
- New GROQ codegen command
- Watch modes
📅 Timelines
- Get this version feature-complete (the items above)
- Release a beta, focus on testing and iterating on the new APIs, gathering feedback
- Release an RC, focus on documentation (and a docs site)
👋 Help Wanted
If you’d like to beta test the new version of this lib, please reach out to me at ricokahler@me.com. I’d love to get this new version in your hands and gather feedback. Right the docs for the new version aren’t great so we’d need to connect to get you set up.
Warning the alpha is currently very rough!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:17
- Comments:5 (3 by maintainers)
Top GitHub Comments
So an update on this, I got overconfident on the previous approach and near the last 20%, it didn’t pan out 😅.
TL;DR I’m rewriting the GROQ code generator from the ground up. See #149
To simplify the documents setup you can maybe opt for something like nextra, It is a really simple setup, and it supports md, mdx out of the box.
I tested it today for a new project, and had some documents setup in a matter of minutes.