Skip to content

Custom module loader to replace and extend the functionality of the default require in Roblox

License

Notifications You must be signed in to change notification settings

cyrus01337/require

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is Require?

A custom module loader built to replace and extend the functionality of the default require global in Roblox. This has been a mini project I've had in mind for a while now and, after working with other languages and seeing how modules could be taken apart, decided to finally include this functionality into Roblox to help speed up the scripting workflow.

License

See LICENSE

Prerequisites

There is an approach that uses Git if your project is Git-oriented for simplicity, however, approaches still exist for non-Git and strictly Roblox Studio users as well. If your project is or going to be on Github, your only requirement will be Git.

Setup

Git

After you've cloned the repo, all you need to do is change directory to the location you want Require to be installed and run:

git submodule add https://github.com/cyrus01337/require.git Require

For those new to sub-modules, this clones the repo and creates the folder under the name Require (git submodule add ... <url> Require) then adds the sub-module as a dependency to your project. If you didn't already have a sub-module added before, a new .gitsubmodules file will appear at the root of your project that stores metadata for Git to use as CLI settings when manipulating (i.e. pulling, fetching) the repo. More info on Git sub-modules here.

Rojo

Download the repo as shown in the diagram below then extract it where you would like to have it installed. Click "Code" then click Download ZIP

ROBLOX Studio

For Studio users, go here or click the init.lua in the repo. Right-click the "Raw" button and save the link as a file, then go into Studio, right-click the instance you want to insert the script into, select "Insert from file..." and open the file you saved.

Contributing

PRs welcome!

About

Custom module loader to replace and extend the functionality of the default require in Roblox

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages