Skip to content
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: indicate in metadata that the quickstart option was used in project creation #6065

Merged
merged 7 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -964,9 +964,8 @@ export default async function initSanity(

function selectProjectTemplate() {
// Make sure the --quickstart and --template are not used together
// Force template to clean if --quickstart is used
if (flags.quickstart) {
return 'clean'
return 'quickstart'
svirs marked this conversation as resolved.
Show resolved Hide resolved
}

const defaultTemplate = unattended || flags.template ? flags.template || 'clean' : null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import blog from './blog'
import clean from './clean'
import getStartedTemplate from './getStarted'
import moviedb from './moviedb'
import quickstart from './quickstart'
import shopify from './shopify'
import shopifyOnline from './shopifyOnline'

Expand All @@ -13,6 +14,7 @@ const templates: Record<string, ProjectTemplate | undefined> = {
moviedb,
shopify,
'shopify-online-storefront': shopifyOnline,
quickstart, // empty project that dynamically imports its own schema
}

export default templates
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import {type ProjectTemplate} from '../initProject'

const quickStartTemplate: ProjectTemplate = {}

export default quickStartTemplate
9 changes: 9 additions & 0 deletions packages/@sanity/cli/templates/quickstart/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Sanity Studio

Congratulations, you have now installed Sanity Studio, an open source real-time content editing environment connected to the Sanity Content Lake backend.

Now you can do the following things:

- [Read “getting started” in the docs](https://www.sanity.io/docs/introduction/getting-started?utm_source=readme)
- [Join the community Slack](https://slack.sanity.io/?utm_source=readme)
- [Extend and build plugins](https://www.sanity.io/docs/content-studio/extending?utm_source=readme)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const schemaTypes = []
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Files placed here will be served by the Sanity server under the `/static`-prefix
Loading