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
6 changes: 6 additions & 0 deletions packages/create/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion packages/create/src/create-vanilla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);
};
Expand Down
27 changes: 13 additions & 14 deletions packages/create/src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand Down
4 changes: 2 additions & 2 deletions packages/create/tests/template.test.ts
Original file line number Diff line number Diff line change
@@ -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);
Expand Down
Loading