Empty documentation.json in Compodocs + Storybook + Angular 9

dvc*_*ior 5 angular storybook compodoc angular9 angular-storybook

I started to use compodoc + storybook in a Angular 9 project.

Installed all the dependencies and Storybook is working fine, but for some reason the documentation.json generated by compodoc is empty, like this:

{
    "pipes": [],
    "interfaces": [],
    "injectables": [],
    "classes": [],
    "directives": [],
    "components": [],
    "modules": [],
    "miscellaneous": [],
    "routes": [],
    "coverage": {
        "count": 0,
        "status": "low",
        "files": []
    }
}
Run Code Online (Sandbox Code Playgroud)

The command I'm using is:

compodoc -p .storybook/tsconfig.json -e json -d ./.storybook
Run Code Online (Sandbox Code Playgroud)

And my tsconfig.json is:

{
  "extends": "../src/tsconfig.app.json",
  "compilerOptions": {
    "types": [
      "node"
    ]
  },
  "exclude": [
    "../src/test.ts",
    "../src/**/*.spec.ts",
    "../projects/**/*.spec.ts"
  ],
  "include": [
    "../src/**/*",
    "../projects/**/*"
  ],
  "files": [
    "./typings.d.ts"
  ]
}
Run Code Online (Sandbox Code Playgroud)

Any ideas of what may be wrong?

小智 8

从切换-p tsconfig.app.json-p tsconfig.json它后工作。我们有两个文件,但我认为 compodoc 不理解tsconfig.app.json扩展tsconfig.json文件,因为它们都是用 JSON 编写的,并且没有依赖关系。

来源


小智 6

使用tsconfig.base.json代替tsconfig.json