[Proposal] Docusarus NodeJS api #4841
Labels
apprentice
Issues that are good candidates to be handled by a Docusaurus apprentice / trainee
proposal
This issue is a proposal, usually non-trivial change
Milestone
🚀 Feature
Expose (some) docusaurus functionality through a NodeJS api.
Have you read the Contributing Guidelines on issues?
Yes
Motivation
At my work I have implemented an automated documentation flow using docusaurus,
react-docgen
,react-docgen-typescript
and file-watchers.We are aiming maintain a good DX in writing documents, so we implemented a flow that uses chokidar to watch multiple project's files (Files in our component library repository, our mobile repo, our main application repo, etc) and generate a bunch of
.md
files that then docusuarus renders.However, there is ATM not an "official" way to programmatically start/stop a docusaurus process.
Pitch
ATM our solution is to reach inside docusaurus core
Unsure on the API exactly, but Ideally we would expose a method that would essentially return a a wrapper around
WebpackDevServer
's.listen
and.close
methods, so expose specific controls over it and not return the whole devServer.docusaurus/packages/docusaurus/src/commands/start.ts
Line 215 in 3548686
A rough schema of what I have in mind
The text was updated successfully, but these errors were encountered: