nuxt-bake 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/README.md +79 -0
  2. package/dist/helpers/constants.js +28 -0
  3. package/dist/helpers/git.js +32 -0
  4. package/dist/helpers/package-manager.js +77 -0
  5. package/dist/helpers/template.js +27 -0
  6. package/dist/helpers/utils.js +42 -0
  7. package/dist/index.js +96 -0
  8. package/eslint.config.ts +26 -0
  9. package/package.json +58 -0
  10. package/playwright.config.ts +6 -0
  11. package/src/helpers/git.ts +28 -0
  12. package/src/helpers/package-manager.ts +86 -0
  13. package/src/helpers/template.ts +35 -0
  14. package/src/helpers/utils.ts +83 -0
  15. package/src/index.ts +106 -0
  16. package/templates/base/.env.example +11 -0
  17. package/templates/base/README.md +58 -0
  18. package/templates/base/app/app.vue +20 -0
  19. package/templates/base/app/assets/styles.css +257 -0
  20. package/templates/base/app/components/dialog.vue +54 -0
  21. package/templates/base/app/components/navbar.vue +51 -0
  22. package/templates/base/app/components/toast.vue +116 -0
  23. package/templates/base/app/composables/use-session-monitor.ts +40 -0
  24. package/templates/base/app/composables/use-theme.ts +41 -0
  25. package/templates/base/app/composables/use-toast.ts +37 -0
  26. package/templates/base/app/error.vue +23 -0
  27. package/templates/base/app/layouts/default.vue +7 -0
  28. package/templates/base/app/pages/index.vue +53 -0
  29. package/templates/base/app/pages/sign-in.vue +39 -0
  30. package/templates/base/app/stores/user-store.ts +50 -0
  31. package/templates/base/app/utils/helpers.ts +42 -0
  32. package/templates/base/eslint.config.ts +74 -0
  33. package/templates/base/nuxt.config.ts +39 -0
  34. package/templates/base/package.json +39 -0
  35. package/templates/base/prisma/schema.prisma +30 -0
  36. package/templates/base/prisma.config.ts +12 -0
  37. package/templates/base/server/api/auth/[provider].ts +67 -0
  38. package/templates/base/server/api/user/index.delete.ts +8 -0
  39. package/templates/base/server/api/user/index.get.ts +10 -0
  40. package/templates/base/server/utils/auth.ts +48 -0
  41. package/templates/base/server/utils/db.ts +15 -0
  42. package/templates/base/server/utils/helpers.ts +14 -0
  43. package/templates/base/shared/types/auth.d.ts +31 -0
  44. package/templates/base/shared/types/globals.d.ts +15 -0
  45. package/templates/base/tsconfig.json +18 -0
  46. package/templates/with-i18n/app/app.vue +29 -0
  47. package/templates/with-i18n/app/components/navbar.vue +74 -0
  48. package/templates/with-i18n/app/error.vue +25 -0
  49. package/templates/with-i18n/app/pages/index.vue +53 -0
  50. package/templates/with-i18n/app/pages/sign-in.vue +39 -0
  51. package/templates/with-i18n/app/utils/i18n.config.ts +14 -0
  52. package/templates/with-i18n/app/utils/locales/en-US.json +50 -0
  53. package/templates/with-i18n/app/utils/locales/fr-FR.json +50 -0
  54. package/templates/with-i18n/nuxt.config.ts +51 -0
  55. package/templates/with-tests/app/pages/index.vue +51 -0
  56. package/templates/with-tests/nuxt.config.ts +31 -0
  57. package/templates/with-tests/playwright.config.ts +13 -0
  58. package/templates/with-tests/tests/e2e/e2e-hello.test.ts +8 -0
  59. package/templates/with-tests/tests/hello.test.ts +7 -0
  60. package/templates/with-tests/vitest.config.ts +16 -0
  61. package/tests/git.test.ts +54 -0
  62. package/tests/package-manager.test.ts +100 -0
  63. package/tests/template.test.ts +73 -0
  64. package/tests/utils.test.ts +155 -0
  65. package/tsconfig.json +13 -0
  66. package/vitest.config.ts +15 -0
@@ -0,0 +1,31 @@
1
+ import tailwindcss from "@tailwindcss/vite"
2
+
3
+ export default defineNuxtConfig({
4
+ modules: [
5
+ "@nuxt/fonts",
6
+ "@nuxt/icon",
7
+ "@nuxtjs/color-mode",
8
+ "@nuxt/test-utils/module",
9
+ "@pinia/nuxt",
10
+ "nuxt-auth-utils",
11
+ ],
12
+ runtimeConfig: {
13
+ public: {
14
+ baseUrl: process.env.NUXT_PUBLIC_BASE_URL,
15
+ },
16
+ },
17
+ vite: {
18
+ plugins: [tailwindcss() as any],
19
+ },
20
+ css: ["~/assets/styles.css"],
21
+ colorMode: {
22
+ classSuffix: "",
23
+ preference: "system",
24
+ fallback: "light",
25
+ storageKey: "nuxt-color-mode",
26
+ },
27
+ icon: {
28
+ mode: "svg",
29
+ clientBundle: { scan: true },
30
+ },
31
+ })
@@ -0,0 +1,13 @@
1
+ import type { ConfigOptions } from "@nuxt/test-utils/playwright"
2
+ import { fileURLToPath } from "node:url"
3
+ import { defineConfig } from "@playwright/test"
4
+
5
+ export default defineConfig<ConfigOptions>({
6
+ outputDir: "./tests/e2e/test-results",
7
+ testDir: "./tests/e2e",
8
+ use: {
9
+ nuxt: {
10
+ rootDir: fileURLToPath(new URL(".", import.meta.url)),
11
+ },
12
+ },
13
+ })
@@ -0,0 +1,8 @@
1
+ import { expect, test } from "@nuxt/test-utils/playwright"
2
+
3
+ test.setTimeout(60000) // 60 seconds
4
+
5
+ test("home page displays main heading", async ({ page, goto }) => {
6
+ await goto("/", { waitUntil: "load" }) // less strict than hydration
7
+ await expect(page.getByRole("heading", { level: 1 })).toHaveText("Nuxt Bake - with Testing Setup")
8
+ })
@@ -0,0 +1,7 @@
1
+ import { describe, expect, it } from "vitest"
2
+
3
+ describe("basic math", () => {
4
+ it("adds numbers", () => {
5
+ expect(1 + 1).toBe(2)
6
+ })
7
+ })
@@ -0,0 +1,16 @@
1
+ import { defineVitestConfig } from "@nuxt/test-utils/config"
2
+
3
+ export default defineVitestConfig({
4
+ test: {
5
+ globals: true,
6
+ environment: "happy-dom",
7
+ setupFiles: "./tests/setup.ts",
8
+ exclude: ["templates/**", "node_modules/**"],
9
+ coverage: {
10
+ provider: "v8",
11
+ reporter: ["text", "html"],
12
+ include: ["src/**/*.{ts,js}"],
13
+ exclude: ["**/*.d.ts", "tests/**", "node_modules/**"],
14
+ },
15
+ },
16
+ })
@@ -0,0 +1,54 @@
1
+ import { spawnSync } from "node:child_process"
2
+ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"
3
+ import * as git from "../src/helpers/git"
4
+
5
+ vi.mock("node:child_process")
6
+
7
+ // Suppress console.error for all tests to avoid confusion
8
+ let consoleSpy: ReturnType<typeof vi.spyOn>
9
+ beforeEach(() => {
10
+ consoleSpy = vi.spyOn(console, "error").mockImplementation(() => {})
11
+ })
12
+ afterEach(() => {
13
+ consoleSpy.mockRestore()
14
+ })
15
+
16
+ describe("cloneRepoToTemp", () => {
17
+ it("should clone repo successfully", () => {
18
+ vi.mocked(spawnSync).mockReturnValue({ status: 0, error: null } as any)
19
+ const tmpDir = git.cloneRepoToTemp("fake-repo-url")
20
+ expect(tmpDir).toContain("nuxt-bake-")
21
+ })
22
+
23
+ it("should return null if clone fails with non-zero status", () => {
24
+ vi.mocked(spawnSync).mockReturnValue({ status: 1, error: null } as any)
25
+ const tmpDir = git.cloneRepoToTemp("fake-repo-url")
26
+ expect(tmpDir).toBeNull()
27
+ })
28
+
29
+ it("should return null if clone fails with error object", () => {
30
+ vi.mocked(spawnSync).mockReturnValue({ status: 0, error: new Error("git error") } as any)
31
+ const tmpDir = git.cloneRepoToTemp("fake-repo-url")
32
+ expect(tmpDir).toBeNull()
33
+ })
34
+ })
35
+
36
+ describe("promptAndInitGit", () => {
37
+ it("should log error if git init fails with error", () => {
38
+ vi.mocked(spawnSync).mockReturnValue({ status: 0, error: new Error("init error") } as any)
39
+ git.promptAndInitGit("/fake/dir")
40
+ expect(consoleSpy).toHaveBeenCalledWith("Failed to initialize Git:", "init error")
41
+ })
42
+
43
+ it("should log error if git init fails with non-zero status", () => {
44
+ vi.mocked(spawnSync).mockReturnValue({ status: 1, error: null } as any)
45
+ git.promptAndInitGit("/fake/dir")
46
+ expect(consoleSpy).toHaveBeenCalledWith("Git init failed")
47
+ })
48
+
49
+ it("should succeed silently if git init succeeds", () => {
50
+ vi.mocked(spawnSync).mockReturnValue({ status: 0, error: null } as any)
51
+ git.promptAndInitGit("/fake/dir")
52
+ expect(consoleSpy).not.toHaveBeenCalled()
53
+ })
54
+ })
@@ -0,0 +1,100 @@
1
+ import { execSync } from "node:child_process"
2
+ import fs from "fs-extra"
3
+ import inquirer from "inquirer"
4
+ import ora from "ora"
5
+ import { beforeEach, describe, expect, it, vi } from "vitest"
6
+ import * as pkgMgr from "../src/helpers/package-manager"
7
+
8
+ vi.mock("fs-extra")
9
+ vi.mock("inquirer")
10
+ vi.mock("ora")
11
+ vi.mock("node:child_process")
12
+
13
+ const readFileMock = vi.mocked(fs.readFile as unknown as (path: string, encoding: string) => Promise<string>)
14
+ const writeFileMock = vi.mocked(fs.writeFile)
15
+ const oraMock = vi.mocked(ora)
16
+ const execMock = vi.mocked(execSync)
17
+
18
+ let spinnerMock: any
19
+
20
+ beforeEach(() => {
21
+ vi.clearAllMocks()
22
+
23
+ spinnerMock = { start: vi.fn().mockReturnThis(), stop: vi.fn(), succeed: vi.fn(), fail: vi.fn() }
24
+ oraMock.mockReturnValue(spinnerMock)
25
+ })
26
+
27
+ describe("createPackageManagerCommands", () => {
28
+ it("should return correct commands for all package managers", () => {
29
+ const managers = [
30
+ { name: "npm", installCmd: "npm install", run: "npm run test" },
31
+ { name: "yarn", installCmd: "yarn install", run: "yarn test" },
32
+ { name: "pnpm", installCmd: "pnpm install", run: "pnpm test" },
33
+ { name: "bun", installCmd: "bun install", run: "bun run test" },
34
+ ]
35
+
36
+ for (const { name, installCmd, run } of managers) {
37
+ const commands = pkgMgr.createPackageManagerCommands(name)
38
+ expect(commands.installCmd).toBe(installCmd)
39
+ expect(commands.runScript("test")).toBe(run)
40
+ }
41
+ })
42
+ })
43
+
44
+ describe("promptForPackageManager", () => {
45
+ it("should prompt and return selected package manager", async () => {
46
+ vi.mocked(inquirer.prompt).mockResolvedValue({ pkgManager: "yarn" })
47
+ const commands = await pkgMgr.promptForPackageManager()
48
+ expect(commands.name).toBe("yarn")
49
+ expect(commands.installCmd).toBe("yarn install")
50
+ })
51
+ })
52
+
53
+ describe("installDependencies", () => {
54
+ it("should run install and lint scripts successfully", async () => {
55
+ execMock.mockReturnValue("")
56
+ const pkg = pkgMgr.createPackageManagerCommands("npm")
57
+ await pkgMgr.installDependencies("targetDir", pkg)
58
+ expect(spinnerMock.succeed).toHaveBeenCalledWith("Dependencies installed!")
59
+ })
60
+
61
+ it("should fail gracefully if execSync throws", async () => {
62
+ execMock.mockImplementation(() => {
63
+ throw new Error("fail")
64
+ })
65
+ const pkg = pkgMgr.createPackageManagerCommands("npm")
66
+ await expect(pkgMgr.installDependencies("targetDir", pkg)).rejects.toThrow("fail")
67
+ expect(spinnerMock.fail).toHaveBeenCalledWith("Failed to install dependencies")
68
+ })
69
+ })
70
+
71
+ describe("updatePackageJson", () => {
72
+ it("should merge dependencies correctly", async () => {
73
+ readFileMock.mockResolvedValue(JSON.stringify({ dependencies: { a: "1" }, devDependencies: {}, scripts: {} }))
74
+ writeFileMock.mockResolvedValue()
75
+ await pkgMgr.updatePackageJson("rootDir", "targetDir", "standard", { dependencies: { b: "2" }, devDependencies: {}, scripts: {} })
76
+ expect(writeFileMock).toHaveBeenCalled()
77
+ })
78
+
79
+ it("should merge devDependencies and scripts", async () => {
80
+ readFileMock.mockResolvedValue(JSON.stringify({
81
+ dependencies: {},
82
+ devDependencies: { a: "1" },
83
+ scripts: { start: "node index.js" },
84
+ }))
85
+ writeFileMock.mockResolvedValue()
86
+ await pkgMgr.updatePackageJson("rootDir", "targetDir", "standard", {
87
+ dependencies: {},
88
+ devDependencies: { b: "2" },
89
+ scripts: { test: "vitest" },
90
+ })
91
+ expect(writeFileMock).toHaveBeenCalled()
92
+ })
93
+
94
+ it("should handle empty extras without error", async () => {
95
+ readFileMock.mockResolvedValue(JSON.stringify({ dependencies: {}, devDependencies: {}, scripts: {} }))
96
+ writeFileMock.mockResolvedValue()
97
+ await pkgMgr.updatePackageJson("rootDir", "targetDir", "standard", {})
98
+ expect(writeFileMock).toHaveBeenCalled()
99
+ })
100
+ })
@@ -0,0 +1,73 @@
1
+ import fs from "fs-extra"
2
+ import { beforeEach, describe, expect, it, vi } from "vitest"
3
+ import * as template from "../src/helpers/template"
4
+
5
+ vi.mock("fs-extra")
6
+
7
+ const tmpDir = "/tmp/mock"
8
+ const targetDir = "/tmp/target"
9
+
10
+ beforeEach(() => {
11
+ vi.clearAllMocks()
12
+ })
13
+
14
+ describe("copyRootTemplate", () => {
15
+ it("throws if path doesn't exist", async () => {
16
+ const pathExistsMock = vi.mocked(fs.pathExists as any)
17
+ pathExistsMock.mockResolvedValue(false)
18
+
19
+ await expect(template.copyRootTemplate(tmpDir, targetDir)).rejects.toThrow(/not found/)
20
+ })
21
+
22
+ it("copies files if path exists", async () => {
23
+ const pathExistsMock = vi.mocked(fs.pathExists as any)
24
+ const copyMock = vi.mocked(fs.copy)
25
+
26
+ pathExistsMock.mockResolvedValue(true)
27
+ copyMock.mockResolvedValue()
28
+
29
+ const result = await template.copyRootTemplate(tmpDir, targetDir)
30
+
31
+ expect(pathExistsMock).toHaveBeenCalledOnce()
32
+ expect(copyMock).toHaveBeenCalledWith(
33
+ expect.stringContaining("base"),
34
+ targetDir,
35
+ )
36
+ expect(result).toContain("base")
37
+ })
38
+ })
39
+
40
+ describe("copyPresetFiles", () => {
41
+ it("throws if preset not found", async () => {
42
+ const pathExistsMock = vi.mocked(fs.pathExists as unknown as (path: string) => Promise<boolean>)
43
+ pathExistsMock.mockResolvedValue(false)
44
+
45
+ await expect(template.copyPresetFiles(tmpDir, "standard", targetDir)).rejects.toThrow(/not found/)
46
+ })
47
+
48
+ it("copies root files and app folder", async () => {
49
+ const pathExistsMock = vi.mocked(fs.pathExists)
50
+ const readdirMock = vi.mocked(fs.readdir as unknown as (path: string) => Promise<string[]>)
51
+ const copyMock = vi.mocked(fs.copy)
52
+
53
+ pathExistsMock.mockImplementation(async () => true)
54
+ readdirMock.mockResolvedValue(["file1.txt", "app"])
55
+ copyMock.mockResolvedValue()
56
+
57
+ await template.copyPresetFiles(tmpDir, "standard", targetDir)
58
+
59
+ expect(readdirMock).toHaveBeenCalledWith(
60
+ expect.stringContaining("standard"),
61
+ )
62
+ expect(copyMock).toHaveBeenCalledWith(
63
+ expect.stringContaining("file1.txt"),
64
+ expect.stringContaining("file1.txt"),
65
+ { overwrite: true },
66
+ )
67
+ expect(copyMock).toHaveBeenCalledWith(
68
+ expect.stringContaining("app"),
69
+ expect.stringContaining("app"),
70
+ { overwrite: true },
71
+ )
72
+ })
73
+ })
@@ -0,0 +1,155 @@
1
+ import fs from "fs-extra"
2
+ import inquirer from "inquirer"
3
+ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"
4
+ import { PRESET_EXTRA_PACKAGES, PRESET_EXTRA_SCRIPTS, REPO_URL } from "../src/helpers/utils"
5
+ import * as utils from "../src/helpers/utils"
6
+
7
+ vi.mock("fs-extra")
8
+ vi.mock("inquirer")
9
+
10
+ const presets = ["standard", "with-i18n", "with-tests"] as const
11
+ let originalArgv: string[]
12
+
13
+ beforeEach(() => {
14
+ originalArgv = [...process.argv]
15
+ })
16
+
17
+ afterEach(() => {
18
+ process.argv = originalArgv
19
+ vi.clearAllMocks()
20
+ })
21
+
22
+ describe("repository", () => {
23
+ it("has a valid REPO_URL", () => {
24
+ expect(REPO_URL).toBe("https://github.com/matimortari/nuxt-bake.git")
25
+ })
26
+ })
27
+
28
+ describe.each(presets)("preset %s", (preset) => {
29
+ it("has a valid scripts object", () => {
30
+ expect(PRESET_EXTRA_SCRIPTS[preset]).toBeTypeOf("object")
31
+ })
32
+
33
+ it("has a valid packages object", () => {
34
+ expect(PRESET_EXTRA_PACKAGES[preset]).toBeTypeOf("object")
35
+ })
36
+ })
37
+
38
+ describe("getProjectNameFromArgs", () => {
39
+ it("returns correct name with -n", () => {
40
+ process.argv = ["node", "cli.js", "-n", "my-nuxt-app"]
41
+ expect(utils.getProjectNameFromArgs()).toBe("my-nuxt-app")
42
+ })
43
+
44
+ it("returns correct name with --name", () => {
45
+ process.argv = ["node", "cli.js", "--name", "my-nuxt-app"]
46
+ expect(utils.getProjectNameFromArgs()).toBe("my-nuxt-app")
47
+ })
48
+
49
+ it("returns null if no name provided", () => {
50
+ process.argv = ["node", "cli.js"]
51
+ expect(utils.getProjectNameFromArgs()).toBeNull()
52
+ })
53
+
54
+ it("returns empty string if -n is empty", () => {
55
+ process.argv = ["node", "cli.js", "-n", ""]
56
+ expect(utils.getProjectNameFromArgs()).toBe("")
57
+ })
58
+ })
59
+
60
+ describe("promptForProjectName", () => {
61
+ it("returns name from args", async () => {
62
+ process.argv = ["node", "cli.js", "-n", "my-arg-nuxt-app"]
63
+ const name = await utils.promptForProjectName()
64
+ expect(name).toBe("my-arg-nuxt-app")
65
+ })
66
+
67
+ it("prompts if no args", async () => {
68
+ process.argv = ["node", "cli.js"]
69
+ const promptMock = vi.mocked(inquirer.prompt as any)
70
+ promptMock.mockResolvedValue({ projectName: "my-prompted-nuxt-app" })
71
+
72
+ const name = await utils.promptForProjectName()
73
+ expect(name).toBe("my-prompted-nuxt-app")
74
+ })
75
+
76
+ it("validator rejects empty string during prompt", async () => {
77
+ process.argv = ["node", "cli.js"]
78
+ const promptMock = vi.mocked(inquirer.prompt as any)
79
+ promptMock.mockImplementation(async (opts: any) => {
80
+ const validateFn = opts.validate
81
+ expect(validateFn("")).toBe("Project folder name cannot be empty")
82
+ expect(validateFn("valid")).toBe(true)
83
+ return { projectName: "my-filled-nuxt-app" }
84
+ })
85
+
86
+ const name = await utils.promptForProjectName()
87
+ expect(name).toBe("my-filled-nuxt-app")
88
+ })
89
+
90
+ it("prompts if -n is empty string", async () => {
91
+ process.argv = ["node", "cli.js", "-n", ""]
92
+ const promptMock = vi.mocked(inquirer.prompt as any)
93
+ promptMock.mockResolvedValue({ projectName: "my-filled-from-empty-nuxt-app" })
94
+
95
+ const name = await utils.promptForProjectName()
96
+ expect(name).toBe("my-filled-from-empty-nuxt-app")
97
+ })
98
+ })
99
+
100
+ describe("validateTargetDirectory", () => {
101
+ it("returns null if path exists and user declines overwrite", async () => {
102
+ const pathExistsMock = vi.mocked(fs.pathExists as any)
103
+ const promptMock = vi.mocked(inquirer.prompt as any)
104
+
105
+ pathExistsMock.mockResolvedValue(true)
106
+ promptMock.mockResolvedValue({ overwrite: false })
107
+
108
+ const result = await utils.validateTargetDirectory("exists")
109
+ expect(result).toBeNull()
110
+ })
111
+
112
+ it("removes existing directory if user confirms overwrite", async () => {
113
+ const pathExistsMock = vi.mocked(fs.pathExists as any)
114
+ const removeMock = vi.mocked(fs.remove as any)
115
+ const promptMock = vi.mocked(inquirer.prompt as any)
116
+
117
+ pathExistsMock.mockResolvedValue(true)
118
+ removeMock.mockResolvedValue()
119
+ promptMock.mockResolvedValue({ overwrite: true })
120
+
121
+ const result = await utils.validateTargetDirectory("exists")
122
+ expect(removeMock).toHaveBeenCalled()
123
+ expect(result).toContain("exists")
124
+ })
125
+
126
+ it("removes existing directory even if projectName is empty string", async () => {
127
+ const pathExistsMock = vi.mocked(fs.pathExists as any)
128
+ const removeMock = vi.mocked(fs.remove as any)
129
+ const promptMock = vi.mocked(inquirer.prompt as any)
130
+
131
+ pathExistsMock.mockResolvedValue(true)
132
+ removeMock.mockResolvedValue()
133
+ promptMock.mockResolvedValue({ overwrite: true })
134
+
135
+ const result = await utils.validateTargetDirectory("")
136
+ expect(removeMock).toHaveBeenCalled()
137
+ expect(result).toContain("")
138
+ })
139
+
140
+ it("returns path if not exists", async () => {
141
+ const pathExistsMock = vi.mocked(fs.pathExists as any)
142
+ pathExistsMock.mockResolvedValue(false)
143
+
144
+ const result = await utils.validateTargetDirectory("new-dir")
145
+ expect(result).toContain("new-dir")
146
+ })
147
+
148
+ it("resolves path even if projectName is empty string and path does not exist", async () => {
149
+ const pathExistsMock = vi.mocked(fs.pathExists as any)
150
+ pathExistsMock.mockResolvedValue(false)
151
+
152
+ const result = await utils.validateTargetDirectory("")
153
+ expect(result).toContain("")
154
+ })
155
+ })
package/tsconfig.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "module": "ESNext",
5
+ "moduleResolution": "node",
6
+ "strict": true,
7
+ "outDir": "dist",
8
+ "esModuleInterop": true,
9
+ "forceConsistentCasingInFileNames": true,
10
+ "skipLibCheck": true
11
+ },
12
+ "include": ["src/index.ts", "src/helpers/**/*.ts"]
13
+ }
@@ -0,0 +1,15 @@
1
+ import { defineConfig } from "vitest/config"
2
+
3
+ export default defineConfig({
4
+ test: {
5
+ globals: true,
6
+ environment: "node",
7
+ exclude: ["templates/**", "node_modules/**"],
8
+ coverage: {
9
+ provider: "v8",
10
+ reporter: ["text", "html"],
11
+ include: ["src/**/*.{ts,js}"],
12
+ exclude: ["**/*.d.ts", "tests/**", "node_modules/**"],
13
+ },
14
+ },
15
+ })