DiFuks / typedoc-theme-hierarchy

Hierarchy theme for typedoc
MIT License
18 stars 5 forks source link

How to use with module? #22

Closed zfben closed 1 year ago

zfben commented 1 year ago

Error

[error] The theme 'hierarchy' is not defined. The available themes are: default [error] Documentation could not be generated due to the errors above.

Code

import { Application, TSConfigReader } from 'typedoc'

const app = new Application()
app.options.addReader(new TSConfigReader())
app.bootstrap({
  entryPoints: ['app'],
  entryPointStrategy: 'Expand',
  plugin: ['typedoc-theme-hierarchy'],
  theme: 'hierarchy',
  excludeExternals: true,
  excludePrivate: true,
  exclude: [
    "**/node_modules/**",
    "**/*.js",
    "**/*.mjs",
    "**/__tests__/**",
  ],
  tsconfig: 'app/tsconfig.json',
})

const project = app.convert()

if (project)
  await app.generateDocs(project, "docs")
DiFuks commented 1 year ago

I think the problem is on the typedoc side. I asked a question https://github.com/TypeStrong/typedoc/issues/2363

DiFuks commented 1 year ago

Please, try this https://github.com/TypeStrong/typedoc/issues/2363#issuecomment-1670425304