How can I use typedoc to build the documentation of an angular-cli project?
I tried with: typedoc --out ./docs ./src but it isn't working. I get this error:
Using TypeScript 2.4.1 from /usr/local/lib/node_modules/typedoc/node_modules/typescript/lib
Error: /Users/user/git/MY_PROJECT/src/app/app.component.ts(0)
Cannot use imports, exports, or module augmentations when '--module' is 'none'.
If I run typedoc --out ./docs ., I get many errors because I have to exclude many other folders.
I don't understand how to use it.
Versions:
angular-cli 1.6
Angular 5.1
Typescript 2.5.3
typedoc 0.9.0
Try the --mode files flag
@aciccarello I tried with --mode file, but it wan't enough. The error is this one:
Cannot use imports, exports, or module augmentations when '--module' is 'none'.
So I used this typedoc --out ./docs --mode file --target ES6 ./src/ and it worked.
Thank u for the support.
Most helpful comment
@aciccarello I tried with --mode file, but it wan't enough. The error is this one:
So I used this
typedoc --out ./docs --mode file --target ES6 ./src/and it worked.Thank u for the support.