Page Contents

Home > @loopback/tsdocs

tsdocs package

The @loopback/tsdocs package is an internal module to generate tsdoc based API docs for @loopback/* packages within loopback-next monorepo managed by Lerna.

Remarks

It’s built on top of Microsoft API Extractor:

Functions

Function Description
getPackages(rootDir) Get workspace packages and sorted them by location
getPackagesWithTsDocs(rootDir) Get an array of lerna-managed TypeScript packages to generate tsdocs
getUnscopedPackageName(name) Get un-scoped package name
runExtractorForMonorepo(options) Run api-extractor for a lerna-managed monrepo
runExtractorForPackage(pkgDir, options)  
shouldGenerateTsDocs(pkg) Check if a package should be processed for tsdocs
updateApiDocs(options) Update markdown files generated by api-documenter to prepend Jekyll metadata and generate apidocs/index.md.

Interfaces

Interface Description
ApiDocsOptions Options for api docs
ExtractorOptions Options to run api-extractor against the lerna repo
LernaPackage Typescript definition for Lerna Package

Variables

Variable Description
DEFAULT_APIDOCS_EXTRACTION_PATH Default path as the output directory for extracted api reports and models
DEFAULT_APIDOCS_GENERATION_PATH Default path for apidocs to be generated for loopback.io site
typeScriptPath Export the TypeScript path from @loopback/build