diff options
| author | Fuwn <[email protected]> | 2022-02-07 04:39:25 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-06-09 00:43:16 -0700 |
| commit | 1f40270bbd7153bb0006d0591cd452009c43d818 (patch) | |
| tree | 11d500bc6bfc9189c0bcf22fe3e1747266b55649 | |
| parent | fmt(src): use — instead of '|' (diff) | |
| download | documentation-1f40270bbd7153bb0006d0591cd452009c43d818.tar.xz documentation-1f40270bbd7153bb0006d0591cd452009c43d818.zip | |
feat: update docs for pre-release
| -rw-r--r-- | inc/menu.md | 2 | ||||
| -rw-r--r-- | src/manifest-format.stx | 67 | ||||
| -rw-r--r-- | src/manifest-format/examples.md | 9 |
3 files changed, 78 insertions, 0 deletions
diff --git a/inc/menu.md b/inc/menu.md index 8b8d445..75aa581 100644 --- a/inc/menu.md +++ b/inc/menu.md @@ -1,3 +1,5 @@ * [Home](@root/) +* [Manifest Format](@root/manifest-format//) + * [Examples](@root/manifest-format/examples//) * [About](@root/about//) * [GitHub](https://github.com/divinaland/Divina) diff --git a/src/manifest-format.stx b/src/manifest-format.stx new file mode 100644 index 0000000..f4d13e6 --- /dev/null +++ b/src/manifest-format.stx @@ -0,0 +1,67 @@ +--- +title: Manifest Format — Divina +meta_title: Manifest Format — Divina +--- + +## Rules + +- All Divina manifests must be named `Divina.lua` +- Package manifests should be in a subdirectory +- A workspace manifest can only source package manifests + +## Divina Exposed Globals + +::: code lua + + --- @class Divina + --- @field public version string Installed Divina version + --- @field public Type table<string, number> Package type + --- @field public Arch table<string, number> Architecture to compile for + Divina = { + version, + Type = { + Bin = 1, + Lib = 2, + }, + Arch = { + x86 = 1, + x64 = 2, + }, + } + + --- @return void + function test() end + +## Workspace Manifest Format + +::: code lua + + --- @class Workspace + --- @field public members string[] + Workspace = { + members, + } + +## Package Manifest Format + +::: code lua + + --- @class Package + --- @field public name string + --- @field public version string + --- @field public description string + --- @field public compile_options string[] + --- @field public minimum_divina_version string + --- @field public sources string[] + --- @field public compiler string + Package = { + name, + version, + description, + compile_options, + minimum_divina_version, + sources, + type, + arch, + compiler, + } diff --git a/src/manifest-format/examples.md b/src/manifest-format/examples.md new file mode 100644 index 0000000..24bdf09 --- /dev/null +++ b/src/manifest-format/examples.md @@ -0,0 +1,9 @@ +--- +title: Manifest Format — Examples — Divina +meta_title: Manifest Format — Examples — Divina +--- + +Examples for package manifests can be found within the Divina root repository +[`examples`](https://github.com/divinaland/Divina/tree/main/examples) directory, +and an example for a workspace manifest can be found within the root Divina repository, named +[`Divina.lua`](https://github.com/divinaland/Divina/blob/main/Divina.lua). |