Closed Brendonovich closed 3 years ago
@Brendonovich I'm like 90% positive that you'll need to use TS project references for this to work correctly for monorepos/multiple packages.
But I'll clone it out and take a look.
@milesj Oh interesting, can't say I'm familiar with TS project references but I'll check it out. Thanks for the heads up!
I've spent some time integrating beemo and packemon & using TS project references like in boost, but it's still not working. Not sure what's going on.
@Brendonovich
Well Beemo/Packemon aren't necessary for this. However, looking at your commit, the code is still not correct, since tsconfig.docs.json
isnt setup to use project refs, and thats what docusaurus is referencing.
I considered switching to Beemo before since GiraphQL uses it, but only did it now since I'm trying to make my repo similar to Boost's. I'm not quite sure how I would make tsconfig.docs.json
use project refs, since its essentially identical to Boost's one, with the packages included rather than referenced. Adding the two packages to tsconfg.docs.json
as references also doesn't fix it. I'm probably missing something crucial, but this seems quite weird
@Brendonovich Can the tsconfigName
point to tsconfig.json
now? Since that has the refs in it.
Same issue, works when I specify one package but not both
Ok I know why it's not working, but I'm not sure of the cause. The problem is the "sources" path is different for your builds compared to mine. For example, mine includes "packages":
While yours does not, which is causing the comparisons to fail:
Let me dig further, but this seems to be on the TypeDoc side.
@Brendonovich I tried lot's of settings but nothing worked, so I went ahead and did this: https://github.com/milesj/docusaurus-plugin-typedoc-api/commit/88b29b5ca306d1da1f056d240ebab576b9d41465
This worked on your repo. Just update the dep and use tsconfig.json
instead of tsconfig.docs.json
.
Works great now, thanks for all the work you've done to make this plugin!
No problem!
I've been trying to get this plugin working for my library simple-obs, and have only had moderate success. When specifying
packages
in the plugin's settings, putting only one of the two packages that are present in the monorepo will successfully generate API documentation for that package, but putting both packages results in no documentation being generated.It appears that TypeDoc is analysing both packages successfully, since the generated JSON file contains information on both packages, but the plugin does not create the pages for the website. If you clone simple-obs, you should just be able to
yarn
andyarn start
in the website directory and have the same results occur.