summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-02-07 04:39:25 -0800
committerFuwn <[email protected]>2025-06-09 00:43:16 -0700
commit1f40270bbd7153bb0006d0591cd452009c43d818 (patch)
tree11d500bc6bfc9189c0bcf22fe3e1747266b55649 /src
parentfmt(src): use &mdash; instead of '|' (diff)
downloaddocumentation-1f40270bbd7153bb0006d0591cd452009c43d818.tar.xz
documentation-1f40270bbd7153bb0006d0591cd452009c43d818.zip
feat: update docs for pre-release
Diffstat (limited to 'src')
-rw-r--r--src/manifest-format.stx67
-rw-r--r--src/manifest-format/examples.md9
2 files changed, 76 insertions, 0 deletions
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 &mdash; Divina
+meta_title: Manifest Format &mdash; 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 &mdash; Examples &mdash; Divina
+meta_title: Manifest Format &mdash; Examples &mdash; 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).