Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add notes about adding custom meta/define doc for lib authors #535

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions content/06-lf.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,19 @@ The compiler argument `--help-user-defines` displays a list of registered define
haxe --lib somelibrary --lib another --help-user-defines
```

Library authors can add those macro calls in `extraParams.hxml`, or can add a `documentation` object to their `haxelib.json`:

```json
{
"name": "MyLib",
// ...
kLabz marked this conversation as resolved.
Show resolved Hide resolved
"documentation": {
"defines": "doc/defines.json"
}
}
```

Defines documented in `doc/defines.json` would then be added the same way a call to `Compiler.registerDefinesDescriptionFile("doc/defines.json", "MyLib")` would do.


<!--label:lf-externs-->
Expand Down Expand Up @@ -910,6 +923,19 @@ The compiler argument `--help-user-metas` displays a list of registered metadata
haxe --lib somelibrary --lib another --help-user-metas
```

Library authors can add those macro calls in `extraParams.hxml`, or can add a `documentation` object to their `haxelib.json`:

```json
{
"name": "MyLib",
// ...
"documentation": {
"metadata": "doc/meta.json"
}
}
```

Metadata documented in `doc/meta.json` would then be added the same way a call to `Compiler.registerMetadataDescriptionFile("doc/meta.json", "MyLib")` would do.


<!--label:lf-access-control-->
Expand Down