Setup Ts Doc and Angular Doc and bundle size analyser
Last updated
Was this helpful?
Last updated
Was this helpful?
If required from the client we need to be able to generate a documentation for the project. To do this we should be able to provide TypeScript and Angular documentation through in code annotations/comments.
TypeScript documentation should be generated using Typedoc (). Just install it as a dev dependency to your project:
Add a 'typedoc.js' script under the 'scripts' folder of your project, where you invoke the Typedoc task (you can find more info on the available options here ):
Then add an npm script to 'package.json' to invoke the script above (directly invoking typedoc binary never worked for me):
and add an npm script to 'package.json' to invoke it:
'--disablePrivate' and '--disableInternal' are optional and are needed to exclude private members/functions.
'-p' points to the typescrypt configuration files (usually 'tsconfig.json' in the project root dir).
'-d' points to the directory where docs will be created.
Moreover, you can add another script which will check for documentation coverage and will fail if some thresholds are not met:
Documentation is generated according to doc comments already present for the TypeScript documentation.
Documentation is generated according to doc comments as described here .
Angular documentation should be generated using Compodoc (). Just install it as a dev dependency to your project: