Hi, I have a project with a ts/ dir that gets built as a node module -- it has an "index.ts" which exports all the relevant symbols from other files in the dir, and the package.json refers to the built "index.js" as main. Ideally, the documentation would treat the "index" module as the root of the project, and show all exported symbols as relative to that root, but I'm having difficulty figuring out how to do that with typedoc.
It seemed like using entryPoint was the right option, so I tried this command:
typedoc --module commonjs --moduleResolution node -t ES5 --noImplicitAny --out docs --excludeExternals --entryPoint "index" ts/index.ts
But get this message:
Warning: The entry point `index` could not be found.
Am I doing it wrong, or is what I'm trying to do not supported?
Simplified example code:
ts/index.ts:
import * as blahmod from "./otherfile"
export let blah:string = blahmod.blah;
ts/otherfile.ts:
export let blah:string = "Just a string";
Almost the same issue. Except that I trying to create documentation on existing js module from .d.ts file
Also can't find a way to treat my module as root.
Same issue here as well. I would love for this to become a feature!
Just ran into this. Entrypoint needs to be the literal name of the module, including quotes. The quotes on the command you have are parsed by the CLI, so need to escape the quotes:
typedoc --entryPoint \"index\"
or
typedoc --entryPoint ""index""
Note: this seems to only work with --mode modules (not --mode files). Also, it only outputs the content of this file (not the content of other files).
Still doesn't work, believe me I've trying all possible combinations and permutations for past 5 hours.
Would really wonderful to see this working
Possibly related: #639.
Closing in favor of #639
I dug into the --entryPoint option a little more and it appears completely broken. Even when TypeDoc finds the reflection, the links do not work correctly.
I recommend avoiding this option for the time being.
works for me,
when running it from package.json scripts, it needs 脺ber escaping
"generate-docs": "rimraf -f generated-docs && typedoc --out generated-docs/ --readme none --entryPoint \"\\\"index\\\"\" --excludeNotExported --ignoreCompilerErrors --mode modules src/index.ts"
Most helpful comment
Just ran into this. Entrypoint needs to be the literal name of the module, including quotes. The quotes on the command you have are parsed by the CLI, so need to escape the quotes: