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.


It’s built on top of Microsoft API Extractor:


Function Description
getPackages(rootDir) Get lerna 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/


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


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 site
typeScriptPath Export the TypeScript path from @loopback/build