@rnw-scripts/doxysaurus
v0.4.48
Published
The new Doxysaurus tool converts Doxygen generated XML to markdown files for Docusaurus.
Downloads
94
Readme
@rnw-scripts/doxysaurus
The new Doxysaurus tool converts Doxygen generated XML to markdown files for Docusaurus.
The main goal for the tool is to generate docs for public C++ APIs defined in Microsoft.ReactNative.Cxx
project.
Doxygen can process code comments and generate HTML, LaTeX and other formats.
To make the generated docs working with our RNW Docusaurus documentation system, we have created the new Doxysaurus tool that runs Doxygen to generate documentation XML and then converts it to the Docusaurus markdown files.
In this PR we add cpp_generate_documentation_comments = doxygen_double_slash_exclamation
to .editorconfig
to instruct Visual Studio and VS Code to use //!
style comments for C++ Doxygen documentation. The //!
makes it easy to use, while it is different from the ///
which is typically used for C# XML comments. This option enables VS to use //!
style comments in IntelliSense and to provide autogenerated tags when we type //!
on top of a function.
Run this command from the root of the repo to generate docs:
yarn doc --output ..\react-native-windows-samples\docs
It does the following:
- downloads Doxygen executable on-demand;
- runs Doxygen to generate XML files;
- converts the Doxygen XML into an in-memory document model;
- generates Docusaurus markdown files by applying Mustache templates to the model in the provided
output
folder; - if the
output
folder is not provided then the markdown files are generated in theout
folder next to thexml
folder in thebuildDir
.
Run the Doxysaurus tool in the 'watch' mode for interactive documentation development:
yarn doc --watch --output ..\react-native-windows-samples\docs
Now we can edit C++ comments, save the file, and see the docs in the browser updated after a small delay.