Skip to content

Commit 4ce5f30

Browse files
committed
format
1 parent 5a572f9 commit 4ce5f30

8 files changed

Lines changed: 68 additions & 66 deletions

File tree

.changeset/pre.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"mode": "pre",
3-
"tag": "alpha",
4-
"initialVersions": {
5-
"@solid-cli/create": "0.6.0-alpha.0",
6-
"create-solid": "0.6.0-alpha.1",
7-
"@solid-cli/full": "0.6.0-alpha.0",
8-
"@solid-cli/utils": "0.6.0-alpha.0"
9-
},
10-
"changesets": []
2+
"mode": "pre",
3+
"tag": "alpha",
4+
"initialVersions": {
5+
"@solid-cli/create": "0.6.0-alpha.0",
6+
"create-solid": "0.6.0-alpha.1",
7+
"@solid-cli/full": "0.6.0-alpha.0",
8+
"@solid-cli/utils": "0.6.0-alpha.0"
9+
},
10+
"changesets": []
1111
}

packages/create/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ export const createSolid = (version: string) =>
8787
`cd ${projectName}
8888
${pM.name} install
8989
${pM.name} ${pM.runScriptCommand("dev")}`,
90-
"To get started, run:");
90+
"To get started, run:",
91+
);
9192
},
9293
});

packages/create/src/utils/constants.ts

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -30,60 +30,60 @@ Thumbs.db
3030
`;
3131

3232
export const JS_CONFIG = {
33-
compilerOptions: {
34-
jsx: "preserve",
35-
jsxImportSource: "solid-js",
36-
paths: {
37-
"~/*": ["./src/*"],
38-
},
39-
},
33+
compilerOptions: {
34+
jsx: "preserve",
35+
jsxImportSource: "solid-js",
36+
paths: {
37+
"~/*": ["./src/*"],
38+
},
39+
},
4040
};
4141

4242
// Supported templates
4343

4444
const VANILLA_TEMPLATES = [
45-
"ts",
46-
"ts-vitest",
47-
"ts-uvu",
48-
"ts-unocss",
49-
"ts-tailwindcss",
50-
"ts-sass",
51-
"ts-router",
52-
"ts-router-file-based",
53-
"ts-minimal",
54-
"ts-jest",
55-
"ts-bootstrap",
56-
"js",
57-
"js-vitest",
58-
"js-tailwindcss",
45+
"ts",
46+
"ts-vitest",
47+
"ts-uvu",
48+
"ts-unocss",
49+
"ts-tailwindcss",
50+
"ts-sass",
51+
"ts-router",
52+
"ts-router-file-based",
53+
"ts-minimal",
54+
"ts-jest",
55+
"ts-bootstrap",
56+
"js",
57+
"js-vitest",
58+
"js-tailwindcss",
5959
] as const;
6060
export type VanillaTemplate = (typeof VANILLA_TEMPLATES)[number];
6161

6262
const START_TEMPLATES = [
63-
"basic",
64-
"bare",
65-
"hackernews",
66-
"notes",
67-
"todomvc",
68-
"with-auth",
69-
"with-authjs",
70-
"with-drizzle",
71-
"with-mdx",
72-
"with-prisma",
73-
"with-solid-styled",
74-
"with-tailwindcss",
75-
"with-trpc",
76-
"with-unocss",
77-
"with-vitest",
78-
"experiments",
63+
"basic",
64+
"bare",
65+
"hackernews",
66+
"notes",
67+
"todomvc",
68+
"with-auth",
69+
"with-authjs",
70+
"with-drizzle",
71+
"with-mdx",
72+
"with-prisma",
73+
"with-solid-styled",
74+
"with-tailwindcss",
75+
"with-trpc",
76+
"with-unocss",
77+
"with-vitest",
78+
"experiments",
7979
] as const;
8080
export type StartTemplate = (typeof VANILLA_TEMPLATES)[number];
8181

8282
export const getTemplatesList = async (isStart: boolean) => {
83-
if (isStart) {
84-
return START_TEMPLATES;
85-
}
86-
return VANILLA_TEMPLATES;
83+
if (isStart) {
84+
return START_TEMPLATES;
85+
}
86+
return VANILLA_TEMPLATES;
8787
};
8888

8989
//
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { expect, it } from "vitest";
2-
import { createVanilla } from "../src"
2+
import { createVanilla } from "../src";
33
import { existsSync } from "fs";
44
it("downloads and extracts the typescript template", async () => {
5-
await createVanilla({ template: "ts", destination: "./test/ts" }, false)
5+
await createVanilla({ template: "ts", destination: "./test/ts" }, false);
66

7-
const appTsx = existsSync("./test/ts/src/App.tsx");
8-
expect(appTsx).toBe(true);
9-
})
7+
const appTsx = existsSync("./test/ts/src/App.tsx");
8+
expect(appTsx).toBe(true);
9+
});

packages/full-solid/src/bin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import * as color from "picocolors";
88
intro(`\n${color.bgCyan(color.black(` Solid CLI v${packageJson.version}`))}`);
99

1010
const main = defineCommand({
11-
subCommands: { create: createSolid(packageJson.version) },
11+
subCommands: { create: createSolid(packageJson.version) },
1212
});
1313

14-
runMain(main);
14+
runMain(main);

packages/utils/src/fs/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ export const readFileToString = async (path: string) => {
1717
// unqueueUpdate(path, "file");
1818
// queueUpdate({ type: "file", name: path, contents, checked: true });
1919
// };
20-
export const writeChecked = async (_path: string, _contents: string) => { throw new Error("Unimplemented") }
20+
export const writeChecked = async (_path: string, _contents: string) => {
21+
throw new Error("Unimplemented");
22+
};
2123
export const insertAtBeginning = async (path: string, text: string) => {
2224
const contents = await readFileToString(path);
2325
writeFile(path, text + contents);

setup.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import type { TestProject } from 'vitest/node'
1+
import type { TestProject } from "vitest/node";
22
import { existsSync, rmSync } from "fs";
33
export default function setup(project: TestProject) {
4-
// Clean up test directory before running tests
5-
if (existsSync("./test"))
6-
rmSync("./test", { recursive: true })
7-
}
4+
// Clean up test directory before running tests
5+
if (existsSync("./test")) rmSync("./test", { recursive: true });
6+
}

vitest.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import { defineConfig } from "vitest/config";
22
export default defineConfig({
3-
test: { globalSetup: ["./setup.ts"] }
4-
})
3+
test: { globalSetup: ["./setup.ts"] },
4+
});

0 commit comments

Comments
 (0)