-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathknip.config.ts
More file actions
142 lines (139 loc) · 3.79 KB
/
Copy pathknip.config.ts
File metadata and controls
142 lines (139 loc) · 3.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
const convexRegisteredFunctionEntries = [
"convex/*.{ts,tsx}!",
"convex/httpApiV1/*.{ts,tsx}!",
] as const;
const includeTests = process.env.KNIP_INCLUDE_TESTS === "1";
const config = {
ignore: [
".artifacts/**",
".nitro/**",
".output/**",
".tanstack/**",
".vercel/**",
"coverage/**",
"dist/**",
"src/routeTree.gen.ts",
"convex/_generated/**",
"packages/*/dist/**",
"packages/clawhub/test-artifact/**",
],
...(includeTests
? {}
: {
ignoreFiles: [
"**/*.test.{ts,tsx,mjs,js}",
"**/__tests__/**",
"src/__tests__/helpers/**",
"packages/clawhub/test/**",
"vitest.setup.ts",
],
}),
workspaces: {
".": {
entry: [
"src/router.tsx!",
"src/server.ts!",
"src/routes/**/*.{ts,tsx}!",
"src/styles.css!",
"server/**/*.{ts,tsx}!",
"emails/**/*.{ts,tsx}!",
"scripts/**/*.{ts,mjs,js}!",
"*.{config,setup}.{ts,mjs,js}!",
...convexRegisteredFunctionEntries,
...(includeTests
? [
"src/**/*.test.{ts,tsx}!",
"src/__tests__/**/*.{ts,tsx}!",
"convex/**/*.test.{ts,tsx}!",
"emails/**/*.test.{ts,tsx}!",
"server/**/*.test.{ts,tsx}!",
]
: []),
],
ignoreDependencies: [
// Production email rendering imports the React Email TSX templates from Convex;
// Knip's production dependency pass does not trace that cross-root preview tree.
"@react-email/components",
"@fontsource/bricolage-grotesque",
"@fontsource/ibm-plex-mono",
"@fontsource/manrope",
"@fontsource/noto-sans-sc",
"tailwindcss",
"tw-animate-css",
// The Convex skill frontmatter parser imports this through the
// convex/lib/skills directory index, which Knip's production pass does not trace.
"yaml",
],
project: [
"src/**/*.{ts,tsx}!",
"src/**/*.css!",
"convex/**/*.{ts,tsx}!",
"emails/**/*.{ts,tsx}!",
"server/**/*.{ts,tsx}!",
"scripts/**/*.{ts,mjs,js}!",
"*.{config,setup}.{ts,mjs,js}!",
],
},
"packages/clawhub": {
entry: [
"bin/clawdhub.js!",
"scripts/build.mjs!",
"src/cli.ts!",
"src/http.ts!",
"src/schema/**/*.ts!",
"vitest*.ts!",
...(includeTests ? ["src/**/*.test.ts!", "test/**/*.ts!", "test-artifact/**/*.ts!"] : []),
],
project: [
"bin/**/*.js!",
"scripts/**/*.{mjs,js,ts}!",
"src/**/*.ts!",
"test/**/*.ts!",
"vitest*.ts!",
],
},
"packages/clawhub-admin": {
entry: [
"bin/clawhub-admin.js!",
"scripts/build.mjs!",
"scripts/typecheck.mjs!",
"src/cli.ts!",
"../clawhub/src/cli/commands/auth.ts!",
"../clawhub/src/cli/commands/packages.ts!",
"../clawhub/src/cli/commands/skills.ts!",
"vitest*.ts!",
...(includeTests ? ["src/**/*.test.ts!"] : []),
],
project: [
"bin/**/*.js!",
"scripts/**/*.{mjs,js,ts}!",
"src/**/*.ts!",
"../clawhub/src/**/*.ts!",
"vitest*.ts!",
],
// The admin build emits selected public CLI helpers into its own dist.
ignoreDependencies: [
"arktype",
"fflate",
"ignore",
"json5",
"mime",
"ora",
"p-retry",
"semver",
"undici",
],
},
"packages/schema": {
entry: [
"src/index.ts!",
"src/licenseConstants.ts!",
"src/routes.ts!",
"src/textFiles.ts!",
...(includeTests ? ["src/**/*.test.ts!"] : []),
],
project: ["src/**/*.ts!"],
},
},
} as const;
export default config;