Skip to content

Commit 69d602a

Browse files
committed
Edit docs
1 parent 770685b commit 69d602a

File tree

3 files changed

+25
-11
lines changed

3 files changed

+25
-11
lines changed

packages/docs/src/content/docs/explanations/comparison-and-migration.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ requirements, then by all means, use what suits you best.
1010

1111
All tools have in common that they have less features and don't support the
1212
concept of [monorepos/workspaces][2]. Feel free to send in projects that Knip
13-
does not handle better, I'm up for the challenge!
13+
does not handle better, Knip loves to be challenged!
1414

1515
## Migration
1616

@@ -25,9 +25,8 @@ A migration consists of deleting the dependency and its configuration file and
2525
> how each dependency is used, which dependencies are useless, and which
2626
> dependencies are missing from package.json.
2727
28-
The project has plugins (specials), yet not as many as Knip has and I'd argue
29-
they're not as advanced. It also supports compilers (parsers) for non-standard
30-
files.
28+
The project has plugins (specials), yet not as many as Knip has and they're not
29+
as advanced. It also supports compilers (parsers) for non-standard files.
3130

3231
The following commands are similar:
3332

packages/docs/src/content/docs/guides/working-with-commonjs.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,5 @@ const B = { option: true };
6868
module.exports = { __esModule: true, A, B };
6969
```
7070

71-
The `__esModule` key could be named differently (but I think makes sense given
72-
it's an informal "CJS/ESM interop" standard amongst compilers and bundlers).
71+
The `__esModule` key could be named differently (but makes sense given it's an
72+
informal "CJS/ESM interop" standard amongst compilers and bundlers).

packages/docs/src/content/docs/reference/faq.md

+20-5
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ imports of internal modules or external dependencies, and so on.
8181

8282
### Why is Knip so heavily engineered?
8383

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.
8686

8787
Building up the module and dependency graph requires non-standard module
8888
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
117117
{
118118
"name": "my-lib",
119119
"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"
121122
}
122123
}
123124
```
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.
124138

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.
127142

128143
### What does Knip look for in source files?
129144

0 commit comments

Comments
 (0)