# Generate a focused JSDoc reference from reviewed source files

Canonical: https://githtml.com/guides/jsdoc-local-public-reference-build
Published: 2026-11-23
Publisher: WaveTech LLC / gitHtml

Run the project's installed JSDoc against explicit reviewed inputs and a maintained configuration, then inspect the generated reference for the intended public surface. A successful parse does not prove descriptions or examples are correct. Keep plugins under review, verify symbol names and visibility, and treat the output directory as a site artifact rather than one self-contained page.

## Choose the reference audience and source scope

Decide whether the output documents a public JavaScript package, an internal module, or a small review target. Identify the source files and configuration that correspond to that audience. Inspect package scripts and use the maintained JSDoc dependency rather than an unrelated global installation. Review plugins and templates as project code, especially if the repository is unfamiliar. Record a few public symbols that must appear and internal helpers that should not. This scope check prevents a broad recursive scan from publishing implementation details or test fixtures simply because they contain documentation comments.

## Build with explicit inputs and configuration

The sample assumes a local JSDoc installation and a reviewed configuration file. Replace the illustrative paths with real project paths, preserving existing output conventions. Confirm command-line options against the installed version and inspect diagnostics for unresolved names or malformed tags. Start with one representative module before broadening the input set. Do not fix a missing page by adding every source directory without understanding how exports and annotations determine symbol identity. Check that example code is displayed literally and that namespace or module relationships match how consumers import the package. A generated index can look complete while grouping the API under misleading names.

````sh
./node_modules/.bin/jsdoc src/public-api.js \
  --configure jsdoc.json --destination docs-review
````

## Review the reference as consumer documentation

Inspect a constructor or function, its parameters, return value, errors, and one example. Compare these with the supported implementation and tests. Treat undocumented assumptions and stale comments as content defects even when JSDoc emits no warning. Follow links between symbols and check that the README or introduction identifies the version and intended audience. Preserve the output's related resources when reviewing it as a site; copying only the index may lose styles, navigation, or other pages. If a smaller HTML reading brief is needed, create a separately scoped export and label it accordingly. Record source revision, configuration, and reviewed symbols for future regeneration. Check the reference after changing an export name even when its implementation is unchanged. Consumers navigate by the public name, and stale generated identity can make accurate descriptions difficult to find.

1. Define public and excluded symbols before selecting source inputs.
2. Use the maintained local dependency and review plugins and templates.
3. Inspect diagnostics, names, and module relationships after the build.
4. Compare representative descriptions and examples with the actual consumer contract.

## Sources and further reading

- [JSDoc command line](https://jsdoc.app/about-commandline)

## Related guides

- [Review mdBook preprocessors before building an unfamiliar book](https://githtml.com/guides/mdbook-preprocessor-trust-and-order)
- [Diagnose missing mdBook chapters from SUMMARY.md](https://githtml.com/guides/mdbook-summary-build-missing-chapters)
- [Distinguish MkDocs drafts, exclusions, and unlisted pages](https://githtml.com/guides/mkdocs-drafts-excluded-files-check)
- [Find why a MkDocs page is missing from navigation](https://githtml.com/guides/mkdocs-nav-page-missing)

Editorial approach: https://githtml.com/guides/about
