Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 2.54 KB

README.md

File metadata and controls

33 lines (23 loc) · 2.54 KB

Libraries

When you use RoStrap, you are using tested and tried Libraries which are continually maintained by the best developers in town! Whenever a developer updates their Library on GitHub, you will see an update button appear (under the INSTALLED tab).

Updates are detected when your source code doesn't match the source code of the latest version of GitHub, excluding whitespace, comments, and configurable variables. Configurable variables have to look like this:

local ALL_CAMEL_CASE = "SINGLE-LINE-VALUE"

Contributing

If you wish to contribute a Library, simply submit a pull request to Libraries.lua. Simply insert a new table with fields URL (you can leave off https://github.com) and an optional Description and you are good to go!

Library Standards

Libraries contributed to RoStrap must be useful, reusable, and reasonably universal. The code must be stable, maintained, readable, and speedy. It must have a readme or documentation website that clearly outlines its use and includes functioning demo code. Images help.

Submitted Libraries may be subject to code review.

How to Package Libraries

To indicate to the plugin's installer that a Lua file is a descendant of another, simply make a folder with the name of the parent Lua file, and place the parent Lua file inside with the name "init" (or "main" or "_"). Here is an example of a single Library that has ModuleScripts within it using this method.

Dependencies

Dependencies are detected by the plugin using this handy script. It can detect from the following source code that Tween and Maid are the names a Library will need to have installed in order to work. If your source code intends to rely on dependencies from the RoStrap system, the detection script must be able to successfully determine the dependencies of your Libraries.

local ReplicatedStorage = game:GetService("ReplicatedStorage") -- You have to use game:GetService
local Resources = require(ReplicatedStorage:WaitForChild("Resources")) -- You have to use WaitForChild
local require = Resources.LoadLibrary -- You can localize LoadLibrary

local Tween = require("Tween") -- Either of these work
local Maid = Resources:LoadLibrary('Maid')