From 8f1cbea7f6fabcaf50042a31477e904ac549dff1 Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Fri, 19 Sep 2025 20:17:47 +0200 Subject: [PATCH 1/3] organize vanilla templates --- packages/create/src/create-vanilla.ts | 3 ++- packages/create/src/utils/constants.ts | 27 +++++++++++++------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/create/src/create-vanilla.ts b/packages/create/src/create-vanilla.ts index ee2cc63..0cebd73 100644 --- a/packages/create/src/create-vanilla.ts +++ b/packages/create/src/create-vanilla.ts @@ -15,9 +15,10 @@ export const createVanilla = (args: CreateVanillaArgs, transpile?: boolean) => { } return createVanillaTS(args); }; + export const createVanillaTS = async ({ template, destination }: CreateVanillaArgs) => { return await downloadRepo( - { repo: { owner: "solidjs", name: "templates", subdir: template }, dest: destination }, + { repo: { owner: "solidjs", name: "templates", subdir: `vanilla/${template}` }, dest: destination }, GithubFetcher, ); }; diff --git a/packages/create/src/utils/constants.ts b/packages/create/src/utils/constants.ts index 3b2cbbf..7444b7a 100644 --- a/packages/create/src/utils/constants.ts +++ b/packages/create/src/utils/constants.ts @@ -42,20 +42,19 @@ export const JS_CONFIG = { /**Supported Vanilla Templates */ const VANILLA_TEMPLATES = [ - "ts", - "ts-vitest", - "ts-uvu", - "ts-unocss", - "ts-tailwindcss", - "ts-sass", - "ts-router", - "ts-router-file-based", - "ts-minimal", - "ts-jest", - "ts-bootstrap", - "js", - "js-vitest", - "js-tailwindcss", + "basic", + "bare", + "with-vitest", + "with-uvu", + "with-unocss", + "with-tailwindcss", + "with-sass", + "with-solid-router", + "with-pages-router-file-based", + "with-tanstack-router-config-based", + "with-tanstack-router-file-based", + "with-jest", + "with-bootstrap", ] as const satisfies string[]; export type VanillaTemplate = (typeof VANILLA_TEMPLATES)[number]; From c832eb1e0a696480d53ee6941ca3f4bb8f733d08 Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Fri, 19 Sep 2025 20:25:26 +0200 Subject: [PATCH 2/3] changelog --- packages/create/CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/create/CHANGELOG.md b/packages/create/CHANGELOG.md index e7234b4..df2fd62 100644 --- a/packages/create/CHANGELOG.md +++ b/packages/create/CHANGELOG.md @@ -1,5 +1,11 @@ # @solid-cli/create +## 0.6.10 + +### Patch Changes + +- Fetch Vanilla templates from /vanilla subdirectory of solidjs/templates, rather than from repo root + ## 0.6.9 ### Patch Changes From 05c11874ee2fd77776cacf8b7b1fb78816bb9ac3 Mon Sep 17 00:00:00 2001 From: Thomas Beer <71586988+Tommypop2@users.noreply.github.com> Date: Fri, 19 Sep 2025 19:59:30 +0100 Subject: [PATCH 3/3] test: fix test for downloading templates --- packages/create/tests/template.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/create/tests/template.test.ts b/packages/create/tests/template.test.ts index ac7027c..6fb0520 100644 --- a/packages/create/tests/template.test.ts +++ b/packages/create/tests/template.test.ts @@ -1,8 +1,8 @@ import { expect, it } from "vitest"; import { createVanilla } from "../src"; import { existsSync } from "fs"; -it("downloads and extracts the typescript template", async () => { - await createVanilla({ template: "ts", destination: "./test/ts" }, false); +it("downloads and extracts the basic template", async () => { + await createVanilla({ template: "basic", destination: "./test/ts" }, false); const appTsx = existsSync("./test/ts/src/App.tsx"); expect(appTsx).toBe(true);