From 1f40270bbd7153bb0006d0591cd452009c43d818 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Mon, 7 Feb 2022 04:39:25 -0800 Subject: feat: update docs for pre-release --- src/manifest-format.stx | 67 +++++++++++++++++++++++++++++++++++++++++ src/manifest-format/examples.md | 9 ++++++ 2 files changed, 76 insertions(+) create mode 100644 src/manifest-format.stx create mode 100644 src/manifest-format/examples.md (limited to 'src') 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 Package type + --- @field public Arch table 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). -- cgit v1.2.3