diff --git a/content/06-lf.md b/content/06-lf.md index 6aabf05b..a5f01a02 100644 --- a/content/06-lf.md +++ b/content/06-lf.md @@ -294,6 +294,18 @@ 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", + "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. @@ -910,6 +922,18 @@ 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.