Typedoc: How to use typedoc with angular-cli 1.6, Angular 5.1 and Typescript 2.5 ?

Created on 15 Dec 2017  路  2Comments  路  Source: TypeStrong/typedoc

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
question

Most helpful comment

@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.

All 2 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lsagetlethias picture lsagetlethias  路  3Comments

goodmind picture goodmind  路  3Comments

atomsoftwarestudios picture atomsoftwarestudios  路  4Comments

KevinEady picture KevinEady  路  3Comments

euberdeveloper picture euberdeveloper  路  3Comments