Skip to content

Commit 3bb1c5e

Browse files
feat: integrate workshop (#44)
1 parent c4238ce commit 3bb1c5e

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

src/constants/templates.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import type {Template} from '../types/template';
22

3-
const APP_DESCRIPTION_STARTER = 'Opt for a barebones scaffolding to kickstart your app';
3+
const APP_DESCRIPTION_STARTER = 'Barebones scaffolding for your new app';
44
const APP_DESCRIPTION_EXAMPLE =
5-
'Begin with an example app featuring authentication, document storage, and image handling';
5+
'An example featuring authentication, data persistence, and image storage';
66

77
export const TEMPLATES: Template[] = [
88
{
99
framework: `Astro`,
1010
key: `astro-starter`,
1111
type: 'Starter',
12-
description: 'Opt for a barebones scaffolding to kickstart your website',
12+
description: 'Barebones scaffolding for your new website',
1313
kind: 'website'
1414
},
1515
{
@@ -40,6 +40,13 @@ export const TEMPLATES: Template[] = [
4040
description: APP_DESCRIPTION_EXAMPLE,
4141
kind: 'app'
4242
},
43+
{
44+
framework: `React`,
45+
key: `react-workshop`,
46+
type: 'Workshop',
47+
description: 'Explore Juno in an interactive workshop',
48+
kind: 'app'
49+
},
4350
{
4451
framework: `SvelteKit`,
4552
key: `sveltekit-starter`,

src/services/prompt.services.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ export const promptTemplate = async (projectKind: ProjectKind): Promise<Template
3333

3434
assertAnswerCtrlC(framework);
3535

36-
const templates = allTemplates[framework];
36+
// We exclude workshop which is a material that serves a particular use case
37+
const templates = allTemplates[framework]?.filter(({type}) => type !== 'Workshop');
3738

3839
if (isNullish(templates) || templates.length === 0) {
3940
console.log(`No template(s) found for ${red(framework)}. This is unexpected.`);

src/types/template.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ export type TemplateFramework =
1717
| 'Vue'
1818
| 'Vanilla JavaScript';
1919

20-
export type TemplateType = 'Starter' | 'Example';
20+
export type TemplateType = 'Starter' | 'Example' | 'Workshop';

0 commit comments

Comments
 (0)