Files
pezkuwi-api/typedoc.config.mjs
Satoshi Qazi Muhammed 65399e28e1 docs: generate the API reference for developers.pezkuwichain.io
Add TypeDoc (0.28.20) and `yarn docs`, which builds the reference for the
nine public API packages from src/ into build-docs/, with a landing page
and a getting-started guide whose examples were run against the live
network. The PR workflow builds it so a broken doc comment or config is
caught before merge.

docs/ held only a redirect to polkadot.js.org; it now holds the guide
sources. The README, packages/api/README.md and three CHANGELOG entries
linked to js.pezkuwichain.app, a domain that is not ours and is listed
for sale; they now point to developers.pezkuwichain.io, the Pezkuwi
Portal, or the upstream polkadot.js.org pages the entries came from.
2026-11-12 03:19:39 +04:00

55 lines
1.8 KiB
JavaScript

// Copyright 2017-2026 @pezkuwi/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
// The API reference published at developers.pezkuwichain.io. `yarn docs` writes it
// to build-docs/ (ignored by git); CI builds it on every pull request.
import { OptionDefaults } from 'typedoc';
/** @type {Partial<import('typedoc').TypeDocOptions>} */
const config = {
entryPointStrategy: 'packages',
entryPoints: [
'packages/api',
'packages/api-base',
'packages/api-contract',
'packages/api-derive',
'packages/rpc-core',
'packages/rpc-provider',
'packages/types',
'packages/types-codec',
'packages/types-create'
],
excludePrivate: true,
hostedBaseUrl: 'https://developers.pezkuwichain.io/',
name: 'Pezkuwi API',
navigationLinks: {
GitHub: 'https://github.com/pezkuwichain/pezkuwi-api',
npm: 'https://www.npmjs.com/package/@pezkuwi/api'
},
out: 'build-docs',
// Each package.json points at its build output; the reference is built from src/.
packageOptions: {
entryPoints: ['src/index.ts'],
readme: 'none',
skipErrorChecking: true
},
projectDocuments: [
'docs/getting-started.md'
],
readme: 'docs/index.md',
skipErrorChecking: true,
tsconfig: 'tsconfig.build.json'
};
// The sources use tags TypeDoc does not define: @description on most members,
// @name on derives, @noInheritDoc and @constructor on some classes. Declaring
// them keeps their text in the reference instead of a warning per use.
// Each package is converted with packageOptions, so the tags go there as well.
for (const target of [config, config.packageOptions]) {
target.blockTags = [...OptionDefaults.blockTags, '@description', '@describe', '@name'];
target.modifierTags = [...OptionDefaults.modifierTags, '@noInheritDoc', '@constructor'];
}
export default config;