lib/config
lib/config.js
Functions(2)
Load and return config from `configPath` (default: cwd/.jsdoc-scribe.json).
Returns an empty object if the file doesn't exist.
| Parameter | Type | Optional | Description |
|---|---|---|---|
configPath | string | yes | - Explicit path to config file. |
Returns:
{ out?, title?, theme?, json?, readme?, ignore?, sourceUrl?, baseUrl?, description? } Signature
loadConfig(configPath: any): any
Merge config file values with CLI args.
CLI args take precedence over config file for every scalar option (explicit
undefined values are skipped) -- EXCEPT `ignore`, which is additive rather
than override-on-conflict: both the config file's and the CLI's `--ignore`
patterns apply together (file-config patterns first, then CLI patterns).
This is deliberate, not an oversight (clarified 2026-07-31, previously this
doc comment claimed a blanket "CLI wins" contract that didn't match the
code below it) -- a project's checked-in ignore list should always apply;
a one-off `--ignore` flag is meant to add an extra exclusion for that run,
not silently drop the config file's exclusions. There is no way to
subtract a config-file ignore pattern from the CLI today.
| Parameter | Type | Optional | Description |
|---|---|---|---|
fileConfig | object | - Values from .jsdoc-scribe.json | |
cliArgs | object | - Values parsed from argv (undefined = not set) |
Returns:
object — Merged options objectSignature
mergeConfig(fileConfig: any, cliArgs: any): any
Variables & Constants(5)