Skip to content

Commit 468e76c

Browse files
shurRostiMelkjoneidejohnsen
authoredMar 26, 2024··
feat: indicate in metadata that the quickstart option was used in project creation (#6065)
* feat: indicate in metadata that the quickstart option was used in project creation * add quickstart template directory * feat: use quickstart template * Update packages/@sanity/cli/templates/quickstart/README.md Co-authored-by: Jon Eide Johnsen <joneidejohnsen@gmail.com> * Update packages/@sanity/cli/templates/quickstart/README.md Co-authored-by: Jon Eide Johnsen <joneidejohnsen@gmail.com> * update selectProjectTemplate comment --------- Co-authored-by: RostiMelk <hello@rosti.no> Co-authored-by: Jon Eide Johnsen <joneidejohnsen@gmail.com>
1 parent 97c0b0c commit 468e76c

File tree

6 files changed

+19
-2
lines changed

6 files changed

+19
-2
lines changed
 

‎packages/@sanity/cli/src/actions/init-project/initProject.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -964,9 +964,8 @@ export default async function initSanity(
964964

965965
function selectProjectTemplate() {
966966
// Make sure the --quickstart and --template are not used together
967-
// Force template to clean if --quickstart is used
968967
if (flags.quickstart) {
969-
return 'clean'
968+
return 'quickstart'
970969
}
971970

972971
const defaultTemplate = unattended || flags.template ? flags.template || 'clean' : null

‎packages/@sanity/cli/src/actions/init-project/templates/index.ts

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import blog from './blog'
33
import clean from './clean'
44
import getStartedTemplate from './getStarted'
55
import moviedb from './moviedb'
6+
import quickstart from './quickstart'
67
import shopify from './shopify'
78
import shopifyOnline from './shopifyOnline'
89

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

1820
export default templates
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import {type ProjectTemplate} from '../initProject'
2+
3+
const quickStartTemplate: ProjectTemplate = {}
4+
5+
export default quickStartTemplate
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Sanity Studio
2+
3+
Congratulations, you have now installed Sanity Studio, an open source real-time content editing environment connected to the Sanity Content Lake backend.
4+
5+
Now you can do the following things:
6+
7+
- [Read “getting started” in the docs](https://www.sanity.io/docs/introduction/getting-started?utm_source=readme)
8+
- [Join the community Slack](https://slack.sanity.io/?utm_source=readme)
9+
- [Extend and build plugins](https://www.sanity.io/docs/content-studio/extending?utm_source=readme)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const schemaTypes = []
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Files placed here will be served by the Sanity server under the `/static`-prefix

0 commit comments

Comments
 (0)
Please sign in to comment.