-
Notifications
You must be signed in to change notification settings - Fork 429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(cli): add support for remote templates with --template
#7867
base: next
Are you sure you want to change the base?
Conversation
Co-authored-by: Espen Hovlandsdal <[email protected]>
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
--template
--template
No changes to documentation |
Component Testing Report Updated Nov 25, 2024 3:23 PM (UTC) ✅ All Tests Passed -- expand for details
|
⚡️ Editor Performance ReportUpdated Mon, 25 Nov 2024 15:25:10 GMT
Detailed information🏠 Reference resultThe performance result of
🧪 Experiment resultThe performance result of this branch
📚 Glossary
|
'--dataset', | ||
testRunArgs.dataset, | ||
'--template', | ||
'https://github.com/SimeonGriggs/sanity-remix-template', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to replace this with something on our org
Introducing Support for Remote Templates in
--template
FlagWhat is a remote template?
A remote template is really any GitHub repo that passes a given set of requirements.
The requirements are:
Monorepo Repositories
package.json
package.json
.sanity
in itsdependencies
ordevDependencies
.Sanity Configuration Files
sanity.config.js/ts
andsanity.cli.js/ts
.Environment Template Files
.env.template
.env.example
.env.local.example
Single-Package Repositories
package.json
package.json
withsanity
listed independencies
ordevDependencies
.Sanity Configuration Files
sanity.config.js/ts
andsanity.cli.js/ts
.Environment Template File
.env.template
.env.example
.env.local.example
Environment Variables
For both monorepos and single-package repositories, the environment file must include in all packages:
SANITY_PROJECT_ID
orSANITY_STUDIO_PROJECT_ID
SANITY_DATASET
orSANITY_STUDIO_DATASET
If any of these criteria are not met, the validation will fail with a detailed error message.
What to review
Tbd
Testing
Shorthand Example
GitHub URL
Nested Directory in a Repository
Notes for release
No notes afaik for now