Skip to content

Commit b5dbf5d

Browse files
committed
docs: don't generate docs for each version of Lua
Each version outputs the exact same docs. This simplifies things. Maybe in the future there will be a way to emit docs that precisely show what each target lang can support, but with better comments this will be good enough.
1 parent 3b85c5d commit b5dbf5d

File tree

3 files changed

+4
-19
lines changed

3 files changed

+4
-19
lines changed

build.zig

+1-8
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,7 @@ pub fn build(b: *Build) void {
121121
const install_docs = b.addInstallDirectory(.{
122122
.source_dir = docs.getEmittedDocs(),
123123
.install_dir = .prefix,
124-
.install_subdir = switch (lang) {
125-
.lua51 => "docs/lua51",
126-
.lua52 => "docs/lua52",
127-
.lua53 => "docs/lua53",
128-
.lua54 => "docs/lua54",
129-
.luajit => "docs/luajit",
130-
.luau => "docs/luau",
131-
},
124+
.install_subdir = "docs",
132125
});
133126

134127
const docs_step = b.step("docs", "Build and install the documentation");

makefile

+1-5
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,4 @@ test:
1212
zig build -Dlang=luau install-example-luau-bytecode
1313

1414
docs:
15-
zig build docs -Dlang=lua51
16-
zig build docs -Dlang=lua52
17-
zig build docs -Dlang=lua53
18-
zig build docs -Dlang=lua54
19-
zig build docs -Dlang=luau
15+
zig build docs

readme.md

+2-6
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,8 @@ In both cases, Ziglua will compile Lua from source and link against your Zig cod
1313
Like the Lua C API, the Ziglua API "emphasizes flexibility and simplicity... common tasks may involve several API calls. This may be boring, but it gives us full control over all the details" (_Programming In Lua 4th Edition_). However, Ziglua takes advantage of Zig's features to make it easier and safer to interact with the Lua API.
1414

1515
## Documentation
16-
Docs are a work in progress and are automatically generated for each push to main. Most functions and public declarations are documented.
17-
* [Ziglua for Lua 5.1 Docs](https://natecraddock.github.io/ziglua/lua51/#ziglua.lib.Lua)
18-
* [Ziglua for Lua 5.2 Docs](https://natecraddock.github.io/ziglua/lua52/#ziglua.lib.Lua)
19-
* [Ziglua for Lua 5.3 Docs](https://natecraddock.github.io/ziglua/lua53/#ziglua.lib.Lua)
20-
* [Ziglua for Lua 5.4 Docs](https://natecraddock.github.io/ziglua/lua54/#ziglua.lib.Lua)
21-
* [Ziglua for Luau Docs](https://natecraddock.github.io/ziglua/luau/#ziglua.lib.Lua)
16+
Docs are a work in progress and are automatically generated for each push to main. Most functions and public declarations are documented:
17+
* [Ziglua Docs](https://natecraddock.github.io/ziglua/#ziglua.lib.Lua)
2218

2319
See [docs.md](https://github.com/natecraddock/ziglua/blob/main/docs.md) for more general information on Ziglua and how it differs from the C API.
2420

0 commit comments

Comments
 (0)