Home

Awesome

Dox

Build Status Haxelib Version Haxelib Downloads Haxelib License

A Haxe documentation generator used by many popular projects such as:

image

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)

  1. Compile the code to be included in the documentation using:
    haxe -xml docs/doc.xml -D doc-gen [LIBS] <CLASSPATH> <TARGET> <PACKAGE_NAME>
    
    E.g.
    haxe -xml docs/doc.xml -D doc-gen --lib hxargs --classpath src -java bin my.aweseome.package
    
  2. Generate the HTML pages using:
    haxelib run dox -i <INPUT_DIR>
    
    ...where 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:

  1. Install docker
  2. Install act
  3. Navigate into the root of your project (where the .github folder is located)
  4. Run the command act
  5. 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.