Skip to content

Commit 6bf515e

Browse files
committed
Add FAQ entry to lock down understanding around #413
1 parent c33fe6b commit 6bf515e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/FAQ.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,21 @@ documentation.
5858
makes it possible to require documentation as part of your linting step,
5959
ensuring that new code doesn't lower documentation coverage.
6060

61+
## Which files does documentation.js include?
62+
63+
By default, `documentation.js` follows dependencies within your source tree
64+
and excludes `node_modules` from results. This is meant to include your application
65+
code automatically but avoid documenting the random npm modules you're
66+
using.
67+
68+
This means that if you point `documentation.js` at your `index.js` file and
69+
that file uses `require` or `import` to include other source files,
70+
those source files will be documented too.
71+
72+
You can customize this behavior by specifying the `--shallow` command-line
73+
option. With `--shallow` specified, dependendencies aren't followed: documentation.js
74+
documents only the files you explicitly name.
75+
6176
## Will adding JSDoc comments slow down my code?
6277

6378
The short answer is "no".

0 commit comments

Comments
 (0)