Please publish json.lua on LuaRocks
jirutka opened this issue ยท 4 comments
Please publish json.lua on LuaRocks, the de facto standard Lua packages repository. This issue has been already raised in #3, but the submitter closed it without any reason.
yes
Could the latest release tag 0.1.2 get pushed to luarocks?
@rxi hi, I'm the admin of luarocks.org โ I can transfer ownership of rxi-json-lua over to you. To upload the latest version to LuaRocks, you can do the following:
-
Create an account at luarocks.org
-
Once you're logged into your account, get an API key at https://luarocks.org/settings/api-keys
-
Create a rockspec file called
rxi-json-lua-0.1.2-1.rockspec
(the-1
means the revision of the rockspec itself) with the following contents:
package = "rxi-json-lua"
version = "0.1.2-1"
source = {
url = "git://github.com/rxi/json.lua",
tag = "v0.1.2",
}
description = {
summary = "A lightweight JSON library for Lua",
detailed = [[
- Implemented in pure Lua: works with 5.1, 5.2, 5.3 and JIT
- Fast: generally outperforms other pure Lua JSON implementations (benchmark scripts)
- Tiny: around 290sloc, 9kb
- Proper error messages, eg: expected '}' or ',' at line 203 col 30
]],
homepage = "https://github.com/rxi/json.lua",
license = "MIT",
}
dependencies = {
"lua >= 5.1, < 5.4"
}
build = {
type = "builtin",
modules = {
["json"] = "json.lua",
-- the original uploader renamed the module to "rxi-json-lua".
-- you might want to keep the line below for compatibility (or not, your call)
--[[
["rxi-json-lua"] = "json.lua",
]]
}
}
-
Install LuaRocks
- Linux: you may simply use this stand-alone binary: https://luarocks.github.io/luarocks/releases/luarocks-3.3.1-linux-x86_64.zip
- Windows: you may simply use this stand-alone binary: https://luarocks.github.io/luarocks/releases/luarocks-3.3.1-windows-64.zip
- Mac:
brew update; brew install luarocks
-
Upload the package:
luarocks upload --api-key=YOUR_KEY rxi-json-lua-0.1.2-1.rockspec
-
Ping me (here is fine) with your chosen account username at luarocks.org so I can transfer the package entry in the root luarocks.org repository over to your account