Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Empty documentation.json in Compodocs + Storybook + Angular 9

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": []
    }
}

The command I'm using is:

compodoc -p .storybook/tsconfig.json -e json -d ./.storybook

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"
  ]
}

Any ideas of what may be wrong?

like image 398
dvc.junior Avatar asked May 08 '20 20:05

dvc.junior


2 Answers

After switching from -p tsconfig.app.json to -p tsconfig.json it worked. We have both files, but I think compodoc does not understand that tsconfig.app.json extends the tsconfig.json file since both are written in JSON and there is no such thing as dependency.

Source

like image 66
nikoswsn Avatar answered Sep 28 '22 06:09

nikoswsn


Use tsconfig.base.json instead of tsconfig.json

like image 43
Vaisakh Pradeep Avatar answered Sep 28 '22 07:09

Vaisakh Pradeep