-
Notifications
You must be signed in to change notification settings - Fork 15
Modules
Basilius Sauter edited this page Apr 20, 2019
·
2 revisions
See Finding and Installing Modules to learn more about how to find, install, and use modules in your game setups. This article is about developing your own module.
- Make a module by starting with the code in the
module-projectrepo:
# --no-secure-http is temporarily required while we setup HTTPS on code.lot.gd
composer create-project --repository https://raw.githubusercontent.com/lotgd/packages/master/build/packages.json -s dev lotgd/module-project fancymodule
This creates a new directory, fancymodule, with some boilerplate code.
-
Inside your module's directory, modify the
composer.jsonfile to include information specific to your module. -
Change the namespace, name of the file and classname of
src/MyModule.phpand put your code there. -
Finally, either push your module to GitHub and add it to our module repository at code.lot.gd or put it somewhere
composercan find it for your crate. See Composer Repositories for more about howcomposerfinds dependencies.