@@ -81,8 +81,8 @@ imports of internal modules or external dependencies, and so on.
81
81
82
82
### Why is Knip so heavily engineered?
83
83
84
- Even though I love the Unix philosophy, at this point I believe for Knip it
85
- makes sense to have the pieces in a single tool.
84
+ Even though a modular approach has its merits, for Knip it makes sense to have
85
+ all the pieces in a single tool.
86
86
87
87
Building up the module and dependency graph requires non-standard module
88
88
resolution and not only static but also dynamic analysis (i.e. actually load and
@@ -117,13 +117,28 @@ dependencies to build up the graph is also exactly what's meant by
117
117
{
118
118
"name" : " my-lib" ,
119
119
"scripts" : {
120
- "start" : " node --import tsx/esm run.ts"
120
+ "start" : " node --import tsx/esm run.ts" ,
121
+ "start" : " vitest -c config/vitest.config.ts"
121
122
}
122
123
}
123
124
```
125
+ - Through plugins handling CI workflow files like ` .github/workflows/ci.yml ` :
126
+ ``` yaml
127
+ jobs :
128
+ test :
129
+ steps :
130
+ run : playwright test e2e/**/*.spec.ts --config playwright.e2e.config.ts
131
+ run : node --import tsx/esm run.ts
132
+ ` ` `
133
+
134
+ Scripts like the ones shown here may also contain references to configuration
135
+ files (` config/vitest.config.ts` and `playwright.e2e.config.ts` in the examples
136
+ above). They're recognized as configuration files and passed to their respective
137
+ plugins, and may contain additional entry files.
124
138
125
- Entry files are added to the module graph and they might lead to additional
126
- entry files recursively until no more entry files are found.
139
+ Entry files are added to the module graph.
140
+ [Module resolution](#module-resolution) might result in additional entry files
141
+ recursively until no more entry files are found.
127
142
128
143
# ## What does Knip look for in source files?
129
144
0 commit comments