Skip to content

Commit

Permalink
Migrate to vitest runner
Browse files Browse the repository at this point in the history
  • Loading branch information
szymmis committed Jan 8, 2024
1 parent 0787756 commit c92fcd6
Show file tree
Hide file tree
Showing 20 changed files with 900 additions and 633 deletions.
8 changes: 1 addition & 7 deletions create-vite-express/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,7 @@ import * as kolorist from "kolorist";
import path from "path";
import prompts from "prompts";

type Template = prompts.Choice & { color: (msg: string) => string };

const TEMPLATES: Template[] = [
{ title: "Vanilla", value: "vanilla", color: kolorist.yellow },
{ title: "React", value: "react", color: kolorist.cyan },
{ title: "Vue", value: "vue", color: kolorist.green },
];
import { TEMPLATES } from "./templates";

async function main() {
const answers = await prompts([
Expand Down
10 changes: 10 additions & 0 deletions create-vite-express/src/templates.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import * as kolorist from "kolorist";
import prompts from "prompts";

type Template = prompts.Choice & { color: (msg: string) => string };

export const TEMPLATES: Template[] = [
{ title: "Vanilla", value: "vanilla", color: kolorist.yellow },
{ title: "React", value: "react", color: kolorist.cyan },
{ title: "Vue", value: "vue", color: kolorist.green },
];
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"dev": "concurrently -i -P \"sh scripts/dev.sh {1}\" \"yarn build --watch\" --",
"build": "rollup --config rollup.config.js --bundleConfigAsCjs",
"postbuild": "sed -i \"s/export default _default/export = _default/\" dist/main.d.ts",
"test": "tsx tests/index.test.ts",
"test:local": "LOCAL_BUILD_TEST=true tsx tests/index.test.ts",
"pretest": "yarn build",
"test": "vitest --pool=forks",
"format": "prettier --write --loglevel silent",
"lint": "eslint --fix",
"type-check": "tsc --noEmit; tsc --noEmit -p create-vite-express/tsconfig.json",
Expand Down Expand Up @@ -52,7 +52,8 @@
"tslib": "^2.6.2",
"tsx": "^4.5.0",
"typescript": "^5.3.2",
"vite": "^5.0.2"
"vite": "^5.0.2",
"vitest": "^1.1.1"
},
"files": [
"./dist"
Expand Down
40 changes: 0 additions & 40 deletions tests/cli.test.ts

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 0 additions & 15 deletions tests/index.test.ts

This file was deleted.

134 changes: 0 additions & 134 deletions tests/lib/runner.ts

This file was deleted.

106 changes: 0 additions & 106 deletions tests/lib/utils.ts

This file was deleted.

Loading

0 comments on commit c92fcd6

Please sign in to comment.