From 2cd7e44a66218c6a40984eb92ed4f7e39112d114 Mon Sep 17 00:00:00 2001 From: Nayan Gautam Date: Sat, 18 Jun 2022 02:28:52 +0000 Subject: [PATCH 01/10] [create-svelte] Add descriptions to select options --- packages/create-svelte/bin.js | 17 +++++++++++++---- .../create-svelte/templates/default/.meta.json | 3 ++- .../create-svelte/templates/skeleton/.meta.json | 3 ++- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/packages/create-svelte/bin.js b/packages/create-svelte/bin.js index 0997c21c274b..879b5a894c46 100755 --- a/packages/create-svelte/bin.js +++ b/packages/create-svelte/bin.js @@ -61,10 +61,11 @@ async function main() { message: 'Which Svelte app template?', choices: fs.readdirSync(dist('templates')).map((dir) => { const meta_file = dist(`templates/${dir}/meta.json`); - const meta = JSON.parse(fs.readFileSync(meta_file, 'utf8')); + const { title, description } = JSON.parse(fs.readFileSync(meta_file, 'utf8')); return { - title: meta.description, + title, + description, value: dir }; }) @@ -75,8 +76,16 @@ async function main() { message: 'Add type checking?', initial: false, choices: [ - { title: 'Type-checked JavaScript', value: 'checkjs' }, - { title: 'TypeScript', value: 'typescript' }, + { + title: 'JavaScript with checkJs', + value: 'checkjs', + description: 'using JavaScript comments for types.' + }, + { + title: 'TypeScript', + value: 'typescript', + description: 'using TypeScript annotations for types.' + }, { title: 'None', value: null } ] }, diff --git a/packages/create-svelte/templates/default/.meta.json b/packages/create-svelte/templates/default/.meta.json index a8ae4ca55d49..724899fe471d 100644 --- a/packages/create-svelte/templates/default/.meta.json +++ b/packages/create-svelte/templates/default/.meta.json @@ -1,3 +1,4 @@ { - "description": "SvelteKit demo app" + "title": "SvelteKit demo app", + "description": "A todo list app showcasing some of the features of SvelteKit" } diff --git a/packages/create-svelte/templates/skeleton/.meta.json b/packages/create-svelte/templates/skeleton/.meta.json index 279d0263563c..ec0f1e9547ec 100644 --- a/packages/create-svelte/templates/skeleton/.meta.json +++ b/packages/create-svelte/templates/skeleton/.meta.json @@ -1,3 +1,4 @@ { - "description": "Skeleton project" + "title": "Skeleton project", + "description": "A blank slate for your new SvelteKit app." } From 05c5c34490384926cd013cd9ed2b5bc35b8b02f2 Mon Sep 17 00:00:00 2001 From: Nayan Gautam Date: Sat, 18 Jun 2022 02:31:13 +0000 Subject: [PATCH 02/10] changeset --- .changeset/thick-swans-join.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/thick-swans-join.md diff --git a/.changeset/thick-swans-join.md b/.changeset/thick-swans-join.md new file mode 100644 index 000000000000..2bf9c9e726de --- /dev/null +++ b/.changeset/thick-swans-join.md @@ -0,0 +1,5 @@ +--- +'create-svelte': patch +--- + +Add descriptions to select options From 54ea43efd9ce964c78a2b140b3acc7f2785c84cf Mon Sep 17 00:00:00 2001 From: Nayan Gautam Date: Sat, 18 Jun 2022 13:47:13 +0000 Subject: [PATCH 03/10] Obsoleteify? description --- packages/create-svelte/bin.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/create-svelte/bin.js b/packages/create-svelte/bin.js index 879b5a894c46..deb33f2d4eac 100755 --- a/packages/create-svelte/bin.js +++ b/packages/create-svelte/bin.js @@ -77,14 +77,12 @@ async function main() { initial: false, choices: [ { - title: 'JavaScript with checkJs', + title: 'With JavaScript comments (JSDoc)', value: 'checkjs', - description: 'using JavaScript comments for types.' }, { - title: 'TypeScript', + title: 'With TypeScript annotations', value: 'typescript', - description: 'using TypeScript annotations for types.' }, { title: 'None', value: null } ] From 465637b8562185fd852fe77bf030ac2779b23df7 Mon Sep 17 00:00:00 2001 From: Nayan Gautam Date: Sat, 18 Jun 2022 13:49:27 +0000 Subject: [PATCH 04/10] formatting --- packages/create-svelte/bin.js | 4 ++-- packages/create-svelte/templates/skeleton/.meta.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/create-svelte/bin.js b/packages/create-svelte/bin.js index deb33f2d4eac..c9caef91b841 100755 --- a/packages/create-svelte/bin.js +++ b/packages/create-svelte/bin.js @@ -78,11 +78,11 @@ async function main() { choices: [ { title: 'With JavaScript comments (JSDoc)', - value: 'checkjs', + value: 'checkjs' }, { title: 'With TypeScript annotations', - value: 'typescript', + value: 'typescript' }, { title: 'None', value: null } ] diff --git a/packages/create-svelte/templates/skeleton/.meta.json b/packages/create-svelte/templates/skeleton/.meta.json index ec0f1e9547ec..d955e18fe6e1 100644 --- a/packages/create-svelte/templates/skeleton/.meta.json +++ b/packages/create-svelte/templates/skeleton/.meta.json @@ -1,4 +1,4 @@ { "title": "Skeleton project", - "description": "A blank slate for your new SvelteKit app." + "description": "A blank slate for your new SvelteKit app" } From 4fd864b671317f697e65c22f4d360b474c21934e Mon Sep 17 00:00:00 2001 From: gtmnayan <50981692+gtm-nayan@users.noreply.github.com> Date: Sun, 19 Jun 2022 06:25:44 +0545 Subject: [PATCH 05/10] Update .meta.json --- packages/create-svelte/templates/skeleton/.meta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/create-svelte/templates/skeleton/.meta.json b/packages/create-svelte/templates/skeleton/.meta.json index d955e18fe6e1..c707b6a95088 100644 --- a/packages/create-svelte/templates/skeleton/.meta.json +++ b/packages/create-svelte/templates/skeleton/.meta.json @@ -1,4 +1,4 @@ { "title": "Skeleton project", - "description": "A blank slate for your new SvelteKit app" + "description": "Barebones scaffolding for your new SvelteKit app" } From 30b2491bea7dc576f02bb584159c00e3a6c9e494 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 22 Jun 2022 08:49:22 -0400 Subject: [PATCH 06/10] Update packages/create-svelte/bin.js --- packages/create-svelte/bin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/create-svelte/bin.js b/packages/create-svelte/bin.js index c9caef91b841..5e02d1d4a978 100755 --- a/packages/create-svelte/bin.js +++ b/packages/create-svelte/bin.js @@ -84,7 +84,7 @@ async function main() { title: 'With TypeScript annotations', value: 'typescript' }, - { title: 'None', value: null } + { title: 'No', value: null } ] }, { From 5d4029bfe7509c25d499194271c881914af25a9d Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 22 Jun 2022 08:49:31 -0400 Subject: [PATCH 07/10] Update packages/create-svelte/bin.js --- packages/create-svelte/bin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/create-svelte/bin.js b/packages/create-svelte/bin.js index 5e02d1d4a978..f763a5b98ae1 100755 --- a/packages/create-svelte/bin.js +++ b/packages/create-svelte/bin.js @@ -81,7 +81,7 @@ async function main() { value: 'checkjs' }, { - title: 'With TypeScript annotations', + title: 'Yes, using TypeScript syntax', value: 'typescript' }, { title: 'No', value: null } From 4cb8a0f1755eb521d05fb619653b4ca7661fc146 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 22 Jun 2022 08:49:38 -0400 Subject: [PATCH 08/10] Update packages/create-svelte/bin.js --- packages/create-svelte/bin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/create-svelte/bin.js b/packages/create-svelte/bin.js index f763a5b98ae1..ff605eaf823b 100755 --- a/packages/create-svelte/bin.js +++ b/packages/create-svelte/bin.js @@ -77,7 +77,7 @@ async function main() { initial: false, choices: [ { - title: 'With JavaScript comments (JSDoc)', + title: 'Yes, using JavaScript with JSDoc comments', value: 'checkjs' }, { From f3d77c4d87cac13808a0943b96fa6d4cd043106e Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 22 Jun 2022 08:49:48 -0400 Subject: [PATCH 09/10] Update packages/create-svelte/bin.js --- packages/create-svelte/bin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/create-svelte/bin.js b/packages/create-svelte/bin.js index ff605eaf823b..96bdfb5e1d51 100755 --- a/packages/create-svelte/bin.js +++ b/packages/create-svelte/bin.js @@ -73,7 +73,7 @@ async function main() { { type: 'select', name: 'types', - message: 'Add type checking?', + message: 'Add type checking with TypeScript?', initial: false, choices: [ { From f3ae9116607f97906eb81f048b43839cbe685f99 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 22 Jun 2022 08:52:27 -0400 Subject: [PATCH 10/10] Update .changeset/thick-swans-join.md --- .changeset/thick-swans-join.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/thick-swans-join.md b/.changeset/thick-swans-join.md index 2bf9c9e726de..69ec820a2c42 100644 --- a/.changeset/thick-swans-join.md +++ b/.changeset/thick-swans-join.md @@ -2,4 +2,4 @@ 'create-svelte': patch --- -Add descriptions to select options +Add descriptions to templates, and make TypeScript options more self-explanatory