enio-ireland / enio

A hub for great inventions built by Enio.
MIT License
30 stars 3 forks source link

Nx typedoc plugin invalid options configuration #46

Closed Fuco1 closed 1 year ago

Fuco1 commented 1 year ago

It seems that the path to the typedoc.json must be prefixed with the project prefix (as if relative to the root of the repo), otherwise typedoc complains it can't find the configuration

"typedoc": {
      "executor": "@enio.ai/typedoc:typedoc",
      "options": {
        "options": "typedoc.json"   /// <<< prefix with libs/ds/ for library project "ds"
      },
      "configurations": {}
    }
AndrewRedican commented 1 year ago

@Fuco1 I cannot reproduce this issue.

How this works is like so:

For any target project,

    "options": {
        "options": "typedoc.json"
     },

in that project's project.json file, refers to a typedoc.json file in the project's directory, not the workspace.

Each project will have its own documentation configuration in the typedoc.json file. This is by design, as projects can come in many different architectures, etc, so it is wise to keep each to its own rather than have them shared at the workspace level.