From 02032a0d75e0f2ac3a03fab56331292668f30fe5 Mon Sep 17 00:00:00 2001 From: k Date: Sat, 27 Jan 2024 13:42:33 +0100 Subject: [PATCH 1/2] Add notes about adding custom meta/define doc for lib authors --- content/06-lf.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/content/06-lf.md b/content/06-lf.md index 6aabf05b..b6ccbcd1 100644 --- a/content/06-lf.md +++ b/content/06-lf.md @@ -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", + // ... + "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 +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. From 3c5a6236e4e51618313e81d56bde8bbcdf1e0e27 Mon Sep 17 00:00:00 2001 From: k Date: Fri, 2 Feb 2024 14:51:48 +0100 Subject: [PATCH 2/2] Remove confusing json comments --- content/06-lf.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/content/06-lf.md b/content/06-lf.md index b6ccbcd1..a5f01a02 100644 --- a/content/06-lf.md +++ b/content/06-lf.md @@ -299,7 +299,6 @@ Library authors can add those macro calls in `extraParams.hxml`, or can add a `d ```json { "name": "MyLib", - // ... "documentation": { "defines": "doc/defines.json" } @@ -928,7 +927,6 @@ Library authors can add those macro calls in `extraParams.hxml`, or can add a `d ```json { "name": "MyLib", - // ... "documentation": { "metadata": "doc/meta.json" }