Hello,
I've tried to use typedoc on my project but since angular-cli relies on webpack, I needed to override the webpack config to add a dedicated plugin to integrate typedoc.
Since webpack config is not accessible in angularcli projects , it would be nice to be able to generate project documentation in the future.
_( If you know how I could do this on my own, please enlight me and I'll propose a pull request)_
Follow this step:
1) Install Typedoc globally with this command npm install --global typedoc.
2) Add typedoc.json with Typedoc configuration:
{
"mode": "modules",
"out": "doc",
"theme": "default",
"ignoreCompilerErrors": "true",
"experimentalDecorators": "true",
"emitDecoratorMetadata": "true",
"target": "ES5",
"moduleResolution": "node",
"preserveConstEnums": "true",
"stripInternal": "true",
"suppressExcessPropertyErrors": "true",
"suppressImplicitAnyIndexErrors": "true",
"module": "commonjs"
}
3) Add these two lines to the package.json:
"docs": "npm run typedoc -- --options typedoc.json --exclude '**/*.spec.ts' ./src/",
"typedoc": "typedoc"
4) Now you can run Typedoc using npm run docs.
Have fun with Typedoc :)
@zacol thanks for the detailed writeup!
hello, I have this problem when I hit npm run docs.
You must either specify the 'out' or 'json' option

@luismiguelbravo If you are using typedoc 0.9.0, there is an issue saying --options typedoc.json is broken on this version.
Replacing typedoc.json with typedoc.js works for me.
typedoc.js with the same configurationmodule.exports = {
mode: 'modules',
out: 'doc',
theme: 'default',
ignoreCompilerErrors: true,
excludePrivate: true,
excludeNotExported: 'true',
target: 'ES5',
moduleResolution: 'node',
preserveConstEnums: 'true',
stripInternal: 'true',
suppressExcessPropertyErrors: 'true',
suppressImplicitAnyIndexErrors: 'true',
module: 'commonjs'
};
package.json"docs": "npm run typedoc -- --options typedoc.js --exclude '**/*.spec.ts' ./src/",
Hope this helps.
work perfect.
Thanks a lot.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
Follow this step:
1) Install Typedoc globally with this command
npm install --global typedoc.2) Add
typedoc.jsonwith Typedoc configuration:3) Add these two lines to the
package.json:4) Now you can run Typedoc using
npm run docs.Have fun with Typedoc :)