Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/elitemastereric/haxedoxinjector

A library which provides a macro to inject documentation into Haxe classes from JSON data.
https://github.com/elitemastereric/haxedoxinjector

documentation haxe macro

Last synced: 9 days ago
JSON representation

A library which provides a macro to inject documentation into Haxe classes from JSON data.

Awesome Lists containing this project

README

        

# Haxe Dox Injector

A library which provides a macro to inject documentation into Haxe classes from JSON data.

## Installation

Install via Haxelib:

```
# Release

# Development
haxelib git haxe-dox-injector
```

## Usage

Apply the macro. For example, this build script will inject documentation into `test.MyClassTwo` from `docs/test/MyClassTwo.json`.

```
# build.hxml
--library haxe-dox-injector

# Apply to a single class...
--macro addMetadata('@:build(dox.inject.Inject.apply("docs/"))', 'test.MyClassTwo')

# ...or to a whole package.
--macro addGlobalMetadata('test', '@:build(dox.inject.Inject.apply("docs/"))', true, true, true)
```

```json
// docs/test/MyClassTwo.json
{
"classDoc": "This applies documentation on the class `MyClassTwo`",
"fieldDocs": [
{
"name": "myField",
"doc": "This applies documentation on the field `MyClassTwo#myField`"
}
]
}
```

## License

Haxe Dox Injector is made available under the MIT License.