Documentation

Browser

Template allows for having auto-generated documentation of out the box:

npm run docs

The best practice is always to document the code directly with use of tsdoc notation. It allows for auto-generating API documentation with use of TypeDoc(notation) that is configured on typedoc.json to output markdown files - instead of html with use of tgreyuk/typedoc-plugin-markdown.

This files are outputted to Docusaurus ./website/docs/api folder for direct consumption.

Additional steps are taken to generate project details and new paths for api files with use of ./eveble/scripts/docs.js.

Documentation with use of Docusaurus then is started in browser.

Static(build)

Since Docusaurus library uses React under the hood, building static version of documentation that can be directly published to Github Pages is MUST:

npm run docs:build

Watch

If documentation is written side by side while developing code, there is option to directly watch for any change in API and outputting it to Docusaurus by use of:

npm run docs:watch

However additional console or use of PM2 is required to run Docusaurus:

cd website && npm run start

However it has it own limitation, since adding new component(ergo new API files) will require rebuilding file paths with use of npm run docs first.

This is done by use of Gulp that watches for any changes in src/**/*.ts files from gulpfile.js.