Orchestrates the construction of a .docset bundle for a single dependency.
A docset has the following on-disk layout:
{package}.docset/
├── icon.png ← package logo (if available)
├── icon@2x.png ← same logo at 2× (for HiDPI displays)
├── meta.json ← name, title, version metadata
└── Contents/
├── Info.plist ← Apple plist with Dash/Zeal configuration
└── Resources/
├── docSet.dsidx ← SQLite search index
└── Documents/docs/{package}/ ← mirrored HTML documentationThe build is skipped (and the existing docset optionally re-installed)
when the current on-disk version matches the requested version, unless
force: true is given.
Summary
Functions
Builds a .docset bundle for dep inside workspace_root/output/.
Returns the default Zeal docsets directory for the current platform.
Derives a human-readable display title from a package name.
Functions
@spec build(ZealDocsets.Dep.t(), Path.t(), keyword()) :: {:ok, Path.t(), Path.t() | nil} | {:skipped, Path.t()}
Builds a .docset bundle for dep inside workspace_root/output/.
Options
:force— whentrue, rebuilds even if the version is alreadyup to date. Defaults to `false`.:install— whentrue, copies the resulting docset to`install_root`. Defaults to `true`.:install_root— the Zeal docsets directory. Defaults to theplatform-specific Zeal docsets path.:mirror_fn— internal/testing hook that overrides the mirroringfunction. Defaults to `&ZealDocsets.Hexdocs.mirror/3`.
Return values
{:ok, docset_path, installed_path}— docset was (re)built and optionally installed.installed_pathisnilwheninstall: false.{:skipped, docset_path}— existing docset is already at the correct version and was skipped.
@spec default_install_root() :: Path.t()
Returns the default Zeal docsets directory for the current platform.
The default path is resolved for Linux, macOS, and Windows.
@spec title_from_package(ZealDocsets.Dep.t()) :: String.t()
Derives a human-readable display title from a package name.
Splits on underscores and capitalises each word:
"phoenix_live_view" → "Phoenix Live View".