Awesome
Dox
A Haxe documentation generator used by many popular projects such as:
Installation
Install the library via haxelib:
haxelib install dox
Usage
Note: Dox requires Haxe 3.1 or higher due to some minor changes in abstract rtti xml generation. You'll also need an up-to-date haxelib (requires support for
classPath
in haxelib.json)
- Compile the code to be included in the documentation using:
E.g.haxe -xml docs/doc.xml -D doc-gen [LIBS] <CLASSPATH> <TARGET> <PACKAGE_NAME>
haxe -xml docs/doc.xml -D doc-gen --lib hxargs --classpath src -java bin my.aweseome.package
- Generate the HTML pages using:
...wherehaxelib run dox -i <INPUT_DIR>
input_dir
points to the directory containing the generated .xml file(s) of the previous step, i.e.haxelib run dox -i docs
:clipboard: For more details, custom theme creation and options check out the Dox wiki
Local development
To test Dox locally, clone the git repo, run npm install
in root directory. This installs the correct Haxe version using lix and all required dependencies.
After that you can run:
npx haxe --run Make dox xml pages server
This compiles Dox, creates XML's, generates the pages and starts a local dev server at http://localhost:2000.
Local development - testing with nektos/act
The GitHub workflow can be run locally using Nekto's act command-line tool. To use it:
- Install docker
- Install act
- Navigate into the root of your project (where the .github folder is located)
- Run the command
act
- On subsequent re-runs you can use
act -r
to reuse previous container which avoids re-installation of components and thus greatly reduces build time.