Search, install, and manage ZeroBrane Studio Packages and Modules from LuaRocks.org directly in your favorite IDE!
-
Download the
LuaRocks.lua
file from this repository and place it in the folder<UserHomePath>/.zbstudio/packages
. -
Download the LuaRocks binary from the official website (for Windows only) or compile it from the source code following the instructions on the official website, and place the executable in the same folder as
LuaRocks.lua
or make it searchable on the systemPATH
. -
Install git (Windows) or run
sudo apt-get install git
(Linux) -
Restart the IDE.
- Search for modules on the Luarocks.org website directly through the plugin;
- Install, update, and remove modules with just one button;
- This plugin is capable of self-updating;
- Quickly access the official website of any installed package;
- ALL official packages are already available for installation in the plugin;
- You can install modules directly in the project or per-user.
Did you write a package for ZeroBrane Studio and want to make it available in the 'IDE Packages' tab of this plugin? Follow the steps below.
-
Create a public repository. The repository name must start with
ZeroBranePackage-
followed by the name of your package. For example, if your package file is namedexample.lua
, the repository name should beZeroBranePackage-example
. It's important to check beforehand ifZeroBranePackage-example
already exists, for instance, if it's been previously released on LuaRocks.org (perform a search before proceeding to ensure uniqueness). -
Upload your
.lua
package file to the repository without theZeroBranePackage-
prefix. Using our example, the file should be namedexample.lua
. -
Now, create a
.rockspec
file (the LuaRocks accepted standard). The Rockspec format should be as follows. Remember to replace the values to fit your package! (In the example below, we'll use our sample:ZeroBranePackage-example
)
package = "ZeroBranePackage-example" --> Edit here
version = "0.1.0-0"
source = {
url = "git://github.com/YOUR-USERNAME/ZeroBranePackage-example.git", --> Edit here
branch = "main"
}
description = {
summary = "Package Example Title", --> Edit here
detailed = [[Package Example Full Description]], --> Edit here
homepage = "https://github.com/YOUR-USERNAME/ZeroBranePackage-example", --> Edit here
maintainer = "Your Name", --> Edit here
license = "MIT"
}
dependencies = {
"lua == 5.1"
}
build = {
type = "builtin",
modules = {
["example"] = "example.lua", --> Mandatory: Remove "ZeroBranePackage-" prefix here
}
}
-
Create an account on LuaRocks.org. LuaRocks is the de facto official package manager for the Lua language. The ecosystem is entirely free.
-
On LuaRocks.org, click Upload. On the left side, under "Rockspec", select the ".rockspec" file you previously created and click Upload.
-
Done! The package is now available in the "IDE Packages" tab in ZeroBrane Studio.
MIT License
Copyright (c) 2023 Propagram
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.