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
2 changes: 1 addition & 1 deletion packages/create/src/create-start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export type CreateStartArgs = {
export const createStartTS = ({ template, destination }: CreateStartArgs) => {
return downloadRepo(
{
repo: { owner: "solidjs", name: "solid-start", subdir: `examples/${template}` },
repo: { owner: "solidjs", name: "templates", subdir: `solid-start/${template}` },
dest: destination,
},
GithubFetcher,
Expand Down
12 changes: 6 additions & 6 deletions packages/create/src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ const VANILLA_TEMPLATES = [
] as const satisfies string[];
export type VanillaTemplate = (typeof VANILLA_TEMPLATES)[number];

/**Supported Start Templates */
/**
* @description This list is hardcoded. But templates are fetched from another github repo.
* @see https://github.com/solidjs/templates/tree/main/solid-start
*/
const START_TEMPLATES = [
"basic",
"bare",
"hackernews",
"notes",
"todomvc",
"with-solidbase",
"with-auth",
"with-authjs",
Expand All @@ -79,8 +79,8 @@ const START_TEMPLATES = [
"with-unocss",
"with-vitest",
"with-strict-csp",
"experiments",
] as const satisfies string[];

export type StartTemplate = (typeof START_TEMPLATES)[number];

/**Supported Library Templates */
Expand Down Expand Up @@ -118,5 +118,5 @@ export function isValidTemplate(type: "start", maybe_template: string): maybe_te
export function isValidTemplate(type: "library", maybe_template: string): maybe_template is LibraryTemplate;
export function isValidTemplate(type: ProjectType, maybe_template: string) {
const templates = getTemplatesList(type);
return templates.find(t => t === maybe_template) !== undefined
return templates.find((t) => t === maybe_template) !== undefined;
}
Loading