Skip to content
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
13 changes: 10 additions & 3 deletions src/constants/templates.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import type {Template} from '../types/template';

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

export const TEMPLATES: Template[] = [
{
framework: `Astro`,
key: `astro-starter`,
type: 'Starter',
description: 'Opt for a barebones scaffolding to kickstart your website',
description: 'Barebones scaffolding for your new website',
kind: 'website'
},
{
Expand Down Expand Up @@ -40,6 +40,13 @@ export const TEMPLATES: Template[] = [
description: APP_DESCRIPTION_EXAMPLE,
kind: 'app'
},
{
framework: `React`,
key: `react-workshop`,
type: 'Workshop',
description: 'Explore Juno in an interactive workshop',
kind: 'app'
},
{
framework: `SvelteKit`,
key: `sveltekit-starter`,
Expand Down
3 changes: 2 additions & 1 deletion src/services/prompt.services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ export const promptTemplate = async (projectKind: ProjectKind): Promise<Template

assertAnswerCtrlC(framework);

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

if (isNullish(templates) || templates.length === 0) {
console.log(`No template(s) found for ${red(framework)}. This is unexpected.`);
Expand Down
2 changes: 1 addition & 1 deletion src/types/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ export type TemplateFramework =
| 'Vue'
| 'Vanilla JavaScript';

export type TemplateType = 'Starter' | 'Example';
export type TemplateType = 'Starter' | 'Example' | 'Workshop';
Loading